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

[video_player_avplay] Support ADAPTIVE_INFO property #656

Merged

Conversation

xiaowei-guan
Copy link
Contributor

@xiaowei-guan xiaowei-guan commented Jan 12, 2024

    _controller = VideoPlayerController.network(
      'https://test.playready.microsoft.com/smoothstreaming/SSWSS720H264PR/SuperSpeedway_720.ism/Manifest',
      streamingProperty: {'ADAPTIVE_INFO':'BITRATES=5000~10000|STARTBITRATE=HIGHEST|SKIPBITRATE=LOWEST'}
    );

Add streamingProperty at the time of initialization, only support ADAPTIVE_INFO now.
More detail, please refer to:
Playing Adaptive Streaming Media

@xiaowei-guan xiaowei-guan marked this pull request as draft January 12, 2024 07:50
@xiaowei-guan xiaowei-guan changed the title Support ADAPTIVE_INFO property [video_player_avplay] Support ADAPTIVE_INFO property Jan 12, 2024
@xiaowei-guan xiaowei-guan marked this pull request as ready for review January 15, 2024 03:33
Copy link
Member

@JSUYA JSUYA left a comment

Choose a reason for hiding this comment

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

I added ADAPTIVE_INFO to mpd type streaming (DRM Widevine) and tested it.
In fact, I couldn't find any changes. Can you recommend a more appropriate sample?

--- a/packages/video_player_avplay/example/lib/main.dart
+++ b/packages/video_player_avplay/example/lib/main.dart
@@ -252,6 +252,10 @@ class _DrmRemoteVideoState extends State<_DrmRemoteVideo> {

     _controller = VideoPlayerController.network(
       'https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears.mpd',
+      streamingProperty: {
+        'ADAPTIVE_INFO':
+            'BITRATES=5000~10000|STARTBITRATE=HIGHEST|SKIPBITRATE=LOWEST'
+      },
       drmConfigs: DrmConfigs(
         type: DrmType.widevine,
         licenseCallback: (Uint8List challenge) async {

packages/video_player_avplay/lib/video_player.dart Outdated Show resolved Hide resolved
@xiaowei-guan
Copy link
Contributor Author

I added ADAPTIVE_INFO to mpd type streaming (DRM Widevine) and tested it. In fact, I couldn't find any changes. Can you recommend a more appropriate sample?

--- a/packages/video_player_avplay/example/lib/main.dart
+++ b/packages/video_player_avplay/example/lib/main.dart
@@ -252,6 +252,10 @@ class _DrmRemoteVideoState extends State<_DrmRemoteVideo> {

     _controller = VideoPlayerController.network(
       'https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears.mpd',
+      streamingProperty: {
+        'ADAPTIVE_INFO':
+            'BITRATES=5000~10000|STARTBITRATE=HIGHEST|SKIPBITRATE=LOWEST'
+      },
       drmConfigs: DrmConfigs(
         type: DrmType.widevine,
         licenseCallback: (Uint8List challenge) async {

You can test it with below codes:

            _NetworkVideo(
              title: '0~5247438',
              url:
                  'https://cph-p2p-msl.akamaized.net/hls/live/2000341/test/master.m3u8',
              adaptiveInfo: 'BITRATES=0~5247438',
            )

You can refer to this sample code:
https://github.com/xiaowei-guan/plugins/tree/avplay_set_streaming_property_sample_code/packages/video_player_avplay

@xiaowei-guan xiaowei-guan merged commit d10b7e2 into flutter-tizen:master Jan 25, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants