silvermine / videojs-chromecast

MIT License
148 stars 75 forks source link

Cannot read property 'getRemotePlayer' of undefined #96

Open anhminh10a2hoa opened 3 years ago

anhminh10a2hoa commented 3 years ago

ChromecastTech.js?ed59:48 Uncaught TypeError: Cannot read property 'getRemotePlayer' of undefined at new constructor (ChromecastTech.js?ed59:48) at Player.loadTech (video.es.js?f0e2:21766) at Player.src (video.es.js?f0e2:24078) at eval (video.es.js?f0e2:24025) at setSourceHelper (video.es.js?f0e2:9744) at eval (video.es.js?f0e2:9739) at Object.setSource (videojs-contrib-ads.es.js?f9ad:748) at setSourceHelper (video.es.js?f0e2:9728) at setSourceHelper (video.es.js?f0e2:9746) at Player.eval (video.es.js?f0e2:9485)

damisparks commented 2 years ago

@anhminh10a2hoa Did you manage to fix this ? I am having the same issue.

image
L1l1AnA commented 1 year ago

Did you manage to fix it? I'm having the same problem when changing the video in a single page app. the code failing is this._remotePlayer = this._chromecastSessionManager.getRemotePlayer(); and it's caused because of a dispose of the player necessary to change the video and at the point this code is executed _chromecastSessionManager is undefined