Code Monkey home page Code Monkey logo

Comments (9)

AnonymHK avatar AnonymHK commented on June 11, 2024

In android

url: https://content.jwplatform.com/manifests/vM7nH0Kl.m3u8

[√] Flutter (Channel stable, 3.13.0, on Microsoft Windows [Version 10.0.19044.1889], locale zh-CN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.5)
[√] Android Studio (version 2022.3)
[√] VS Code (version 1.70.0)
[√] Connected device (4 available)
[√] Network resources

image

from fvp.

zezo357 avatar zezo357 commented on June 11, 2024

the fix is to set ffmpeg ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto i dont how it can be done in the package

https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setpropertyconst-stdstring-key-const-stdstring-value
Since 0.7.0. Set additional properties. Can be used to store user data, or change player behavior if the property is defined internally.

this only for predefined or it can be used to set ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto
and if yes can you help me do it, or apply by default on video_player interface to allow m3u8 playback from files

from fvp.

wang-bin avatar wang-bin commented on June 11, 2024

https://github.com/wang-bin/fvp/blob/master/lib/src/video_player_mdk.dart#L121

try

player.setProperty('avio.protocol_whitelist', 'file,http,https,tcp,tls,crypto');

from fvp.

wang-bin avatar wang-bin commented on June 11, 2024

I will add an option in registerWith() to passthrough mdk options and player properties

from fvp.

zezo357 avatar zezo357 commented on June 11, 2024

I will add an option in registerWith() to passthrough mdk options and player properties

That will be awesome, just as an idea, maybe as a map and they get set on the launch of the player?

I don't know if that will make the start of the video slow or not, it's just a thought

from fvp.

wang-bin avatar wang-bin commented on June 11, 2024

I will add an option in registerWith() to passthrough mdk options and player properties

That will be awesome, just as an idea, maybe as a map and they get set on the launch of the player?

Yes. It's the only way to control the player backend.

I don't know if that will make the start of the video slow or not, it's just a thought

No. The speed depends on network, stream bit rate etc, not simple lines of code.

from fvp.

zezo357 avatar zezo357 commented on June 11, 2024

I will add an option in registerWith() to passthrough mdk options and player properties

That will be awesome, just as an idea, maybe as a map and they get set on the launch of the player?

Yes. It's the only way to control the player backend.

I don't know if that will make the start of the video slow or not, it's just a thought

No. The speed depends on network, stream bit rate etc, not simple lines of code.

That's awesome then❤️

from fvp.

zezo357 avatar zezo357 commented on June 11, 2024

https://github.com/wang-bin/fvp/blob/master/lib/src/video_player_mdk.dart#L121

try

player.setProperty('avio.protocol_whitelist', 'file,http,https,tcp,tls,crypto');

i can confirm adding the line made it work

    final player = mdk.Player();
    _log.fine('$hashCode player${player.nativeHandle} create($uri)');
    if (_options is Map<String, dynamic>) {
      player.videoDecoders = _options['video.decoders'];
    }
    if (dataSource.httpHeaders.isNotEmpty) {
      String headers = '';
      dataSource.httpHeaders.forEach((key, value) {
        headers += '$key: $value\r\n';
      });
      player.setProperty('avio.headers', headers);
    }
    player.setProperty('avio.protocol_whitelist', 'file,http,https,tcp,tls,crypto');

just a suggestion if that can be the default it will be easier on people and it will be the same as video_player

from fvp.

zezo357 avatar zezo357 commented on June 11, 2024

should i close this issue, or leave it until the release?

from fvp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.