Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

video_player: autodetect video source format #613

Merged
merged 7 commits into from
Jun 26, 2018
Merged

video_player: autodetect video source format #613

merged 7 commits into from
Jun 26, 2018

Conversation

pyrossh
Copy link

@pyrossh pyrossh commented Jun 14, 2018

Use the file/url extension to detect the source format and accordingly create the right media sources

Use the file/url extension to detect the source format and accordingly create the right media sources
@pyrossh pyrossh changed the title autodetect video source format video_player: autodetect video source format Jun 14, 2018
@pyrossh
Copy link
Author

pyrossh commented Jun 18, 2018

@googlebot assign reviewer please.

@anupcowkur
Copy link

@pyros2097 Thanks for this PR! Been trying fruitlessly to get HLS streams working on flutter all day till I saw this. Hope it gets merged soon.

@pyrossh
Copy link
Author

pyrossh commented Jun 25, 2018

@anupcowkur Yeah man, Even I need this to be merged. So what I did now is add the platform channel in my app directly. Couldn't wait for this to be merged to test it out.

Copy link
Contributor

@mravn-google mravn-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. Please bump the version in pubspec.yaml and add a CHANGELOG.md entry.

@pyrossh
Copy link
Author

pyrossh commented Jun 26, 2018

@mravn-google Done. Thank you.

new AspectRatioVideo(controller),
),
new NetworkPlayerLifeCycle(
'http://live.cloud6.in:1935/simskasri/limitless/playlist.m3u8',
Copy link
Contributor

@mravn-google mravn-google Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need something less controversial here. I don't know this feed, but the first thing I got when I tried it was a preacher.

Alternatively, the example app can just keep using the .mp4 file only.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I've changed it to a big buck bunny hls stream.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to control the top video without interfering with the bottom one. They seem to be too close. Can I ask you to add some padding?

Copy link
Contributor

@mravn-google mravn-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the example.

@mravn-google mravn-google self-assigned this Jun 26, 2018
@pyrossh
Copy link
Author

pyrossh commented Jun 26, 2018

Oh man... too late someone else bumped the version to 0.6.2 and pushed sad.

@cbenhagen
Copy link
Contributor

0.6.3 has been released as well. You might want to rebase and bump to 0.6.4 ;)

@mravn-google
Copy link
Contributor

6.3 is already out. I'll hold back on more pushes until we've landed yours.

@pyrossh
Copy link
Author

pyrossh commented Jun 26, 2018

Haha... Yeah... Just figured that out. Thanks btw.

Copy link
Contributor

@mravn-google mravn-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mravn-google mravn-google merged commit ec97c4b into flutter:master Jun 26, 2018
@pyrossh pyrossh deleted the add_more_video_formats_support branch June 26, 2018 14:02
@Hixie
Copy link
Contributor

Hixie commented Oct 23, 2018

This seems like the wrong approach... shouldn't we be dispatching based on the headers we receive from the server, rather than the extension? Paths in URLs are supposed to be opaque.

@pyrossh
Copy link
Author

pyrossh commented Oct 24, 2018

@Hixie Yes you are right. That would be the ideal solution. But then it is also possible to not send the right header so at that point we would need to fallback on the extension or manually provided format type. Also didn't dig into how to implement it using headers.
Also I looked into how react-native-video implemented it and followed their approach.

https://github.com/react-native-community/react-native-video/blob/master/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java#L285

@raveesh-me
Copy link

raveesh-me commented Dec 25, 2018

isHLS from #607 ... I want it back.
video_player plays m3u8 format on both platforms, but it just plays all quality streams at once instead of progressively loading with network streams.

It works well with JWPlayer but not with the video_player plugin :-(

I have filed a detailed issue on this,
flutter/flutter#25738

@pyros2097 can you please look into this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
7 participants