mediafront / osmplayer

The Open Standard Media Player is an all-in-one media player for the web. It is an industry changing, open source (MIT) media player that is built to dynamically deliver any type of web media, including HTML5, YouTube, Vimeo, and Flash.
http://www.mediafront.org
MIT License
342 stars 181 forks source link

Key input broken after calling play function #35

Open pangus45 opened 11 years ago

pangus45 commented 11 years ago

Tried on latest Chrome, Firefox and IE - same problem. I'm using Youtube. I haven't tried it with any other provider but if I create a Youtube player myself and call playVideo it doesn't happen, so I'm pretty sure it's something in the OSM player.

To reproduce, create a page with a player and an input. Attach...

                minplayer.get('media', function(media) {

                    media.play();
                }); 

...to a setTimeout or to a button click.

You can no longer enter text into the input. Clicking on the player or out of the window and back in the input will fix it.

pangus45 commented 11 years ago

$('.minplayer-default-play').click();

...has the same effect. Clicking the play button of the player works fine.

pangus45 commented 11 years ago
            minplayer.get('media', function(media) {

                media.player.playVideo();
            }); 

... didn't fix it either.

travist commented 11 years ago

Will you provide the complete html page that reproduces this issue?

pangus45 commented 11 years ago

That was quick - Here's the page bar the html tags which it wouldn't accept.

<head>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/start/jquery-ui.css" >
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>

    <script type="text/javascript" src="../MyJSLib/osmplayer/bin/osmplayer.compressed.js"></script> 

    <link rel="stylesheet" href="../MyJSLib/osmplayer/templates/default/css/osmplayer_default.css">
    <script type="text/javascript" src="../MyJSLib/osmplayer/templates/default/js/osmplayer.default.js"></script>
    <script type="text/javascript" src="../MyJSLib/osmplayer/templates/default/js/osmplayer.controller.default.js"></script>
    <script type="text/javascript" src="../MyJSLib/osmplayer/templates/default/js/osmplayer.pager.default.js"></script>
    <script type="text/javascript" src="../MyJSLib/osmplayer/templates/default/js/osmplayer.playLoader.default.js"></script>
    <script type="text/javascript" src="../MyJSLib/osmplayer/templates/default/js/osmplayer.playlist.default.js"></script>
    <script type="text/javascript" src="../MyJSLib/osmplayer/templates/default/js/osmplayer.teaser.default.js"></script>

    <script type="text/javascript">

        $(document).ready(function() {

            $('video').osmplayer(); 

            window.setTimeout(function(){

                minplayer.get('media', function(media) {

                    media.play();
                }); 

            },5000);
        });

    </script>
</head>
<body>
    <video id="youtube" src="http://www.youtube.com/watch?v=wjiaDgmM_2Q"></video>
    <input type="text">
</body>
pangus45 commented 11 years ago

Were you able to reproduce it?

pangus45 commented 11 years ago

Sorry to be persistent. Would love to know if you were able to reproduce it so I can write off it being anything at my end. Am I using the player in ways I shouldn't etc.?