videojs_rails 4.7.2 → 4.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09a5e75ed8e1da2d3d12fd85c362106954162a22
|
4
|
+
data.tar.gz: bf7f11deb27980d5d8452d271b24f9d6c5e13acd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e326f904d321901affbfa826f74705fe79472247ce52b1c157b2966d047b733a73fba7826d5dfeee08061dfe114ff6697d79d54f0ac53b60e2dace34f9b84cee
|
7
|
+
data.tar.gz: 8addec410307b8cc7c56c0cb884ad8cd9bfa1cc628054d16ae359a81c7856a5dac88257d7251d9a26fd3ee5905f638e63724525962d02d0dd012e77a6170739f
|
@@ -118,6 +118,25 @@ if (vjs.CDN_VERSION !== 'GENERATED'+'_CDN_VSN') {
|
|
118
118
|
videojs.options['flash']['swf'] = "<%= asset_path('video-js.swf') %>";
|
119
119
|
}
|
120
120
|
|
121
|
+
/**
|
122
|
+
* Utility function for adding languages to the default options. Useful for
|
123
|
+
* amending multiple language support at runtime.
|
124
|
+
*
|
125
|
+
* Example: vjs.addLanguage('es', {'Hello':'Hola'});
|
126
|
+
*
|
127
|
+
* @param {String} code The language code or dictionary property
|
128
|
+
* @param {Object} data The data values to be translated
|
129
|
+
* @return {Object} The resulting global languages dictionary object
|
130
|
+
*/
|
131
|
+
vjs.addLanguage = function(code, data){
|
132
|
+
if(vjs.options['languages'][code] !== undefined) {
|
133
|
+
vjs.options['languages'][code] = vjs.util.mergeOptions(vjs.options['languages'][code], data);
|
134
|
+
} else {
|
135
|
+
vjs.options['languages'][code] = data;
|
136
|
+
}
|
137
|
+
return vjs.options['languages'];
|
138
|
+
};
|
139
|
+
|
121
140
|
/**
|
122
141
|
* Global player list
|
123
142
|
* @type {Object}
|
@@ -1551,7 +1570,7 @@ vjs.util = {};
|
|
1551
1570
|
vjs.util.mergeOptions = function(obj1, obj2){
|
1552
1571
|
var key, val1, val2;
|
1553
1572
|
|
1554
|
-
// make a copy of obj1 so we're not
|
1573
|
+
// make a copy of obj1 so we're not overwriting original values.
|
1555
1574
|
// like prototype.options_ and all sub options objects
|
1556
1575
|
obj1 = vjs.obj.copy(obj1);
|
1557
1576
|
|
@@ -1569,10 +1588,7 @@ vjs.util.mergeOptions = function(obj1, obj2){
|
|
1569
1588
|
}
|
1570
1589
|
}
|
1571
1590
|
return obj1;
|
1572
|
-
}
|
1573
|
-
|
1574
|
-
|
1575
|
-
/**
|
1591
|
+
};/**
|
1576
1592
|
* @fileoverview Player Component - Base class for all UI objects
|
1577
1593
|
*
|
1578
1594
|
*/
|
@@ -4416,7 +4432,7 @@ vjs.Player.prototype.sourceList_ = function(sources){
|
|
4416
4432
|
this.loadTech(sourceTech.tech, sourceTech.source);
|
4417
4433
|
}
|
4418
4434
|
} else {
|
4419
|
-
this.error({ code: 4, message: this.options()['notSupportedMessage'] });
|
4435
|
+
this.error({ code: 4, message: this.localize(this.options()['notSupportedMessage']) });
|
4420
4436
|
// we could not find an appropriate tech, but let's still notify the delegate that this is it
|
4421
4437
|
// this needs a better comment about why this is needed
|
4422
4438
|
this.triggerReady();
|