locked
html 5 player error

    Question

  • Good day,

    I used

    <iframe class="videoframe" height="100%" width="100%" frameborder="0"></iframe>

    and got YouTube video as source for this iframe. Everything was good: video played with sound. But when I clicked on back arrow at item detail page there was error (only when video source was playing):

    Unhandled exception at line 696, column 168 in http://s.ytimg.com/yts/jsbin/html5player-vflveGye9.js

    0x800a1391 - JavaScript runtime error: 'NaN' is undefined

    Is it YouTube player error? Or something else?

    Thank you.

    Monday, May 06, 2013 7:09 AM

All replies

  • thank you!
    Monday, May 06, 2013 11:38 AM
  • In navigator.js file change _updateBackButton function:
                        var backButton = this.pageElement.querySelector("header[role=banner] .win-backbutton");
                        var pageElement = this.pageElement;
                        if (backButton) {
                            backButton.onclick = function () {
                                var iframe = pageElement.querySelector("iframe");
                                if (iframe) {
                                    iframe.src = "";
                                }
                                nav.back();
                            };

                            if (nav.canGoBack) {
                                backButton.removeAttribute("disabled");
                            } else {
                                backButton.setAttribute("disabled", "disabled");
                            }
                        }

    Wednesday, June 05, 2013 6:58 AM