Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example to create a player to play hls on android #33

Closed
alexistkd opened this issue Apr 19, 2014 · 15 comments
Closed

example to create a player to play hls on android #33

alexistkd opened this issue Apr 19, 2014 · 15 comments
Labels

Comments

@alexistkd
Copy link

Hi i would like to know if theres any doc or example file or how this player should be configured to play a stream hls

@alexistkd
Copy link
Author

@fixedmachine i tried this also your example http://projekktor.wlodkowski.net/demo_hls.php but doesnt work in android 4.0+ now i configured this http://www.streaming507.com/players/tvblast/1.html works in my machine but not in android it stays loading icon

@rwlodkowski
Copy link
Collaborator

Hi @alexistkd,

it's easy. Just add an HLS item to the playlist and use proper flash fallback version.

So your config should look similar to this:

 $(document).ready(function() {
                projekktor('#player_a', {
                    playerFlashMP4: '/swf/StrobeMediaPlayback/StrobeMediaPlayback_hls.swf', // remember to use version with HLS support
                    playerFlashMP3: '/swf/StrobeMediaPlayback/StrobeMediaPlayback_hls.swf',
                    platforms: ['browser', 'ios', 'android', 'flash', 'native'],
                    playlist: [     
                        {
                        0: {src: "http://demo.unified-streaming.com/video/oceans/oceans_aes.ism/oceans_aes.m3u8", type: "application/mpegURL", streamType: "httpVideo"}, // your HLS manifest goes here
                        1: {src: "/media/intro.mp4", type: "video/mp4", streamType: "http"} // you can even add progressive fallback
                        }
                    ]    
                }
                );
            });

That's all. Should work on any device with flash 10.2+ installed or mobile device with HLS support (Android 4.1+, iOS 3+).

Live demo here:
http://projekktor.wlodkowski.net/demo_hls.php

Best
fixedmachine

@alexistkd
Copy link
Author

@fixedmachine yes i tried that demo in android but shows loading icon

@alexistkd
Copy link
Author

@fixedmachine this works http://www.streaming507.com/players/tvblast/1.html in my browser in mac but not in android running 4.4.2 galaxy s4

@alexistkd
Copy link
Author

screenshot_2014-04-18-23-39-41

@rwlodkowski
Copy link
Collaborator

@alexistkd which Android version and what browser on it are you using? As I told you only Android 4.1+ are supported. Android 4.0 HLS support is buggy and we don't support it. Take a look at this:
http://www.jwplayer.com/html5/hls/

I've just tested that demo on Chrome and Native Browser on Android 4.2.2 Galaxy S3 and it's working just fine. On my iPad with iOS 7.0.2 works fine too.

Best
fixedmachine

@alexistkd
Copy link
Author

@fixedmachine im testing with the native browser 4.4.2

@alexistkd
Copy link
Author

@fixedmachine it may be buggy with my galaxy s4 too, i just test it out with my nexus 5 and works good the stream

@rwlodkowski
Copy link
Collaborator

I don't have access to any device with 4.4.2 now so I can't debug it.

Please let me know if you experiencing the same issue with the current developement version of projekktor:
http://projekktor.wlodkowski.net/demo_hls_1.4.00.php

Best
fixedmachine

@alexistkd
Copy link
Author

@fixedmachine see that demo works perfect in my s4

@rwlodkowski
Copy link
Collaborator

Great to hear that. The next version of projekktor will be released in the next few weeks I suppose. But if you need it now you can just take the developement version from my demo site and use it.

Best
fixedmachine

@alexistkd
Copy link
Author

got it thank you very much

@alexistkd
Copy link
Author

@fixedmachine i just forgot i can enable auto play?

i put this playerFlashMP4: 'swf/StrobeMediaPlayback/StrobeMediaPlayback_hls_mss_1.0.9-beta_debug.swf',
playerFlashMP3: 'swf/StrobeMediaPlayback/StrobeMediaPlayback_hls_mss_1.0.9-beta_debug.swf',
width: 640,
height: 385,
autoplay: true,

but doesnt autoplays

@alexistkd alexistkd reopened this Apr 19, 2014
@alexistkd
Copy link
Author

nevermind got it thank you so much @fixedmachine

@rwlodkowski
Copy link
Collaborator

Autoplay will not work on mobile devices only on desktops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants