mirror of
https://github.com/videojs/video.js.git
synced 2025-11-06 09:19:15 +02:00
@alex-phillips added ontextdata to Flash tech. closes #2748
This commit is contained in:
committed by
Gary Katsevman
parent
f36da276e3
commit
e7ca49e668
@@ -16,6 +16,7 @@ CHANGELOG
|
|||||||
* @ldayananda updated videojs to not do anything if no src is set ([view](https://github.com/videojs/video.js/pull/3378))
|
* @ldayananda updated videojs to not do anything if no src is set ([view](https://github.com/videojs/video.js/pull/3378))
|
||||||
* @nickygerritsen removed unused tracks when changing sources. Fixes #3000 ([view](https://github.com/videojs/video.js/pull/3002))
|
* @nickygerritsen removed unused tracks when changing sources. Fixes #3000 ([view](https://github.com/videojs/video.js/pull/3002))
|
||||||
* @vit-koumar updated Flash tech to return Infinity from duration instead of -1 ([view](https://github.com/videojs/video.js/pull/3128))
|
* @vit-koumar updated Flash tech to return Infinity from duration instead of -1 ([view](https://github.com/videojs/video.js/pull/3128))
|
||||||
|
* @alex-phillips added ontextdata to Flash tech ([view](https://github.com/videojs/video.js/pull/2748))
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"tsml": "1.0.1",
|
"tsml": "1.0.1",
|
||||||
"videojs-font": "2.0.0",
|
"videojs-font": "2.0.0",
|
||||||
"videojs-ie8": "1.1.2",
|
"videojs-ie8": "1.1.2",
|
||||||
"videojs-swf": "5.0.1",
|
"videojs-swf": "5.1.0",
|
||||||
"videojs-vtt.js": "0.12.1",
|
"videojs-vtt.js": "0.12.1",
|
||||||
"xhr": "2.2.0"
|
"xhr": "2.2.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -624,6 +624,7 @@ class Player extends Component {
|
|||||||
this.on(this.tech_, 'texttrackchange', this.handleTechTextTrackChange_);
|
this.on(this.tech_, 'texttrackchange', this.handleTechTextTrackChange_);
|
||||||
this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);
|
this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);
|
||||||
this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);
|
this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);
|
||||||
|
this.on(this.tech_, 'textdata', this.handleTechTextData_);
|
||||||
|
|
||||||
this.usingNativeControls(this.techGet_('controls'));
|
this.usingNativeControls(this.techGet_('controls'));
|
||||||
|
|
||||||
@@ -1160,6 +1161,14 @@ class Player extends Component {
|
|||||||
this.trigger('loadedmetadata');
|
this.trigger('loadedmetadata');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleTechTextData_() {
|
||||||
|
var data = null;
|
||||||
|
if (arguments.length > 1) {
|
||||||
|
data = arguments[1];
|
||||||
|
}
|
||||||
|
this.trigger('textdata', data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires when the browser has loaded the current frame of the audio/video
|
* Fires when the browser has loaded the current frame of the audio/video
|
||||||
*
|
*
|
||||||
@@ -2876,6 +2885,13 @@ Player.prototype.handleTechLoadStart_;
|
|||||||
*/
|
*/
|
||||||
Player.prototype.handleLoadedMetaData_;
|
Player.prototype.handleLoadedMetaData_;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when the player receives text data
|
||||||
|
*
|
||||||
|
* @event textdata
|
||||||
|
*/
|
||||||
|
Player.prototype.handleTextData_;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when the player has downloaded data at the current playback position
|
* Fired when the player has downloaded data at the current playback position
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -471,7 +471,7 @@ Flash.checkReady = function(tech){
|
|||||||
// Trigger events from the swf on the player
|
// Trigger events from the swf on the player
|
||||||
Flash.onEvent = function(swfID, eventName){
|
Flash.onEvent = function(swfID, eventName){
|
||||||
let tech = Dom.getEl(swfID).tech;
|
let tech = Dom.getEl(swfID).tech;
|
||||||
tech.trigger(eventName);
|
tech.trigger(eventName, Array.prototype.slice.call(arguments, 2));
|
||||||
};
|
};
|
||||||
|
|
||||||
// Log errors from the swf
|
// Log errors from the swf
|
||||||
|
|||||||
Reference in New Issue
Block a user