mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-26 17:46:26 +03:00
Add missing events and methods to cast proxy
The emsg, loading, and unloading events were present in v2.0.0. The drmInfo, isInProgress, and keySystem method were also present in v2.0.0. The getPlayheadTimeAsDate method was introduced in v2.0.1. None of these were proxied to the cast device until now. All v2.0.x events and methods are now being proxied. Change-Id: I6fba60f4ca451053c1449cafcddd9c1006292ad9
This commit is contained in:
+10
-3
@@ -92,7 +92,10 @@ shaka.cast.CastUtils.VideoVoidMethods = [
|
||||
shaka.cast.CastUtils.PlayerEvents = [
|
||||
'adaptation',
|
||||
'buffering',
|
||||
'emsg',
|
||||
'error',
|
||||
'loading',
|
||||
'unloading',
|
||||
'texttrackvisibility',
|
||||
'trackschanged'
|
||||
];
|
||||
@@ -103,14 +106,18 @@ shaka.cast.CastUtils.PlayerEvents = [
|
||||
* @const {!Array.<string>}
|
||||
*/
|
||||
shaka.cast.CastUtils.PlayerGetterMethods = [
|
||||
'drmInfo',
|
||||
'getConfiguration',
|
||||
'getManifestUri',
|
||||
'getPlaybackRate',
|
||||
'getPlayheadTimeAsDate',
|
||||
'getTracks',
|
||||
'getStats',
|
||||
'isBuffering',
|
||||
'isInProgress',
|
||||
'isLive',
|
||||
'isTextTrackVisible',
|
||||
'keySystem',
|
||||
'seekRange'
|
||||
];
|
||||
|
||||
@@ -140,13 +147,13 @@ shaka.cast.CastUtils.PlayerInitAfterLoadState = [
|
||||
* @const {!Array.<string>}
|
||||
*/
|
||||
shaka.cast.CastUtils.PlayerVoidMethods = [
|
||||
'addTextTrack',
|
||||
'cancelTrickPlay',
|
||||
'configure',
|
||||
'resetConfiguration',
|
||||
'trickPlay',
|
||||
'cancelTrickPlay',
|
||||
'selectTrack',
|
||||
'setTextTrackVisibility',
|
||||
'addTextTrack'
|
||||
'trickPlay'
|
||||
];
|
||||
|
||||
|
||||
|
||||
@@ -659,20 +659,25 @@ describe('CastReceiver', function() {
|
||||
|
||||
function createMockPlayer() {
|
||||
var player = {
|
||||
configure: jasmine.createSpy('configure'),
|
||||
destroy: jasmine.createSpy('destroy'),
|
||||
drmInfo: jasmine.createSpy('drmInfo'),
|
||||
getConfiguration: jasmine.createSpy('getConfiguration'),
|
||||
getManifestUri: jasmine.createSpy('getManifestUri'),
|
||||
getPlaybackRate: jasmine.createSpy('getPlaybackRate'),
|
||||
getPlayheadTimeAsDate: jasmine.createSpy('getPlayheadTimeAsDate'),
|
||||
getTracks: jasmine.createSpy('getTracks'),
|
||||
getStats: jasmine.createSpy('getStats'),
|
||||
isBuffering: jasmine.createSpy('isBuffering'),
|
||||
isInProgress: jasmine.createSpy('isInProgress'),
|
||||
isLive: jasmine.createSpy('isLive'),
|
||||
isTextTrackVisible: jasmine.createSpy('isTextTrackVisible'),
|
||||
seekRange: jasmine.createSpy('seekRange'),
|
||||
configure: jasmine.createSpy('configure'),
|
||||
setTextTrackVisibility: jasmine.createSpy('setTextTrackVisibility'),
|
||||
setMaxHardwareResolution: jasmine.createSpy('setMaxHardwareResolution'),
|
||||
keySystem: jasmine.createSpy('keySystem'),
|
||||
load: jasmine.createSpy('load'),
|
||||
destroy: jasmine.createSpy('destroy'),
|
||||
seekRange: jasmine.createSpy('seekRange'),
|
||||
setMaxHardwareResolution: jasmine.createSpy('setMaxHardwareResolution'),
|
||||
setTextTrackVisibility: jasmine.createSpy('setTextTrackVisibility'),
|
||||
|
||||
addEventListener: function(eventName, listener) {
|
||||
player.listeners[eventName] = listener;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user