frankyghost / projekktor

The Free Web Video Player
195 stars 75 forks source link

responsive live streaming #45

Closed alexistkd closed 10 years ago

alexistkd commented 10 years ago

Hi im trying to make the video player responsive heres my code:

when i put width : 100% and height 100% the video dissapears but i have sound how i can fix this.

thank you.

<!-- Load projekktor css -->
    <link rel="stylesheet" href="themes/maccaco/projekktor.style.css" type="text/css" media="screen" />

    <!-- Load jquery -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

    <!-- load projekktor js -->
    <script type="text/javascript" src="projekktor-1.4.00-test.js"></script>    </head>
<body>

    <div id="player_a" class="projekktor">
        <noscript><p>No JavaScript support.</p></noscript>
    </div>
    <script type="text/javascript">
        $(document).ready(function() {
            projekktor('#player_a', {

              controls: true,
              autoplay: true,
              title: 'Projekktor - Inline HLS video support',
              playerFlashMP4: 'swf/StrobeMediaPlayback/StrobeMediaPlayback_hls_mss.swf',
                playerFlashMP3: 'swf/StrobeMediaPlayback /StrobeMediaPlayback_hls_mss.swf',
                width: 640,
                height: 385,
                platforms: ['browser', 'ios', 'android', 'flash', 'native'],
                playlist: [     
                    {
                    0: {src: "http://ip:1935/videostreaming/videostreaming/playlist.m3u8", type: "application/mpegURL", streamType: "httpVideo"}, // your HLS manifest goes here
                    1: {src: "", type: "video/mp4", streamType: "http"} // you can even add progressive fallback
                    }
          ]    
            }
            );
        });
    </script>
</body>

rwlodkowski commented 10 years ago

Please don't use 1.4.00 it`s a work in progress branch. Did you tried the same with 1.3.09?

alexistkd commented 10 years ago

yes i do i dont know what else i can do could u help me please..

alexistkd commented 10 years ago

i put

width: 100%, height: 100%,

then the video player dissapeared

rwlodkowski commented 10 years ago

@alexistkd could you provide me a link to your testing site? It will be easier for me to check what's going one there.

alexistkd commented 10 years ago

there u go

streaming507.com/players/waotv/1.html

rwlodkowski commented 10 years ago

@alexistkd I don't see any issues with that. Where did you put that 100% ?

alexistkd commented 10 years ago

@fixedmachine i want to put that video responsive to adapt, i put 100% in js

playerFlashMP3: 'swf/StrobeMediaPlayback /StrobeMediaPlayback_hls_mss.swf', width: 640, height: 385,

here

alexistkd commented 10 years ago

@fixedmachine change the size of the browser and the video wont change neither i would like to make it responsive its possible?

alexistkd commented 10 years ago

@fixedmachine what u think about it? how i can fix this bro the responsive in live streaming thank you

rwlodkowski commented 10 years ago

@alexistkd I can't reproduce your problem. Projekktor works just fine with responsive layout. You can test it here: http://projekktor.wlodkowski.net/demo_responsive.php

Please use string values for percents in projekktor config not just plain values without quotes because it will cause errors and won't set values you're trying to set.

so use:

width: '100%',
height: '100%'