Closed abdelaziz-mahdy closed 10 months ago
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
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
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 will add an option in registerWith()
to passthrough mdk options and player properties
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
I will add an option in
registerWith()
to passthrough mdk options and player propertiesThat 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.
I will add an option in
registerWith()
to passthrough mdk options and player propertiesThat 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❤️
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
should i close this issue, or leave it until the release?
Exception: No Stream for textureId: -1.
logs