hackbart Posted October 24, 2017 Posted October 24, 2017 Hi, does somebody have any idea why the following code does not work: c.prototype.setSource = function(a, c) { c = c || "video/mp4"; this.stop(); !d.PlayerBase.REBUILD_PLAYER && this.checkMediaElementIntegrity() || this.rebuildPlayer(c); var b = setInterval(function(d) { d._mediaElement && (d._mediaElement.type = c, d._mediaElement.data = a, d.playState = e.states.INIT, d._mediaElement.onPlayStateChange = function() { var a = d.getPlayState(); d.playState !== a && (d.playStateChange(a), d.playState = a) }, d.vidSource = a, clearInterval(b)) }, 100, this) }; but: c.prototype.setSource = function(a, c) { c = c || "video/mp4"; this.stop(); !d.PlayerBase.REBUILD_PLAYER && this.checkMediaElementIntegrity() || this.rebuildPlayer(c); var b = setInterval(function(d) { d._mediaElement && (d._mediaElement.type = c, d._mediaElement.data = a, d.playState = e.states.INIT, alert("Hello"), d._mediaElement.onPlayStateChange = function() { var a = d.getPlayState(); d.playState !== a && (d.playStateChange(a), d.playState = a) }, d.vidSource = a, clearInterval(b)) }, 100, this) }; does? I mean the only difference is alert("Hello"). The code is part of the Watchbox HbbTV application which is the successor of clip fish. Does alert does something special, except raising a message box? Christian Quote
hackbart Posted October 24, 2017 Author Posted October 24, 2017 I'm loving it, while debugging their HbbTV application - they somehow managed to add yet another bug into it /js/app.2063364764.min.js:8723 Uncaught TypeError: Cannot read property 'ivw_tag_t1' of undefined Quote
hackbart Posted October 25, 2017 Author Posted October 25, 2017 Okay, they fixed the problem, so i was able to fiddle out why the playback inside the DVBViewer was not working. I'm not sure if it is a bug of their script, a problem of Webkit - which we use for rendering, or an issue inside the HbbTV implementation. Anyhow it seem to be that i have to focus the video object in order to get onPlayStateChange working. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.