flutter-tizen / plugins

Flutter plugins for Tizen
66 stars 47 forks source link

[audioplayers] Audio HLS not supported #536

Closed dan-live365 closed 11 months ago

dan-live365 commented 1 year ago

Hello! I'm using audioplayers_tizen to stream audio to a Tizen TV app. In order to achieve that I'm using a AudioPlayer _tizenPlayer = AudioPlayer(); await _tizenPlayer!.play(UrlSource(url)); Everytime I try to play from a HLS stream I get:

[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Not supported format

0 MethodChannelAudioplayersPlatform._doHandlePlatformCall (package:audioplayers_platform_interface/method_channel_audioplayers_platform.dart:174:9)

1 MethodChannelAudioplayersPlatform.platformCallHandler (package:audioplayers_platform_interface/method_channel_audioplayers_platform.dart:147:7)

2 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:536:55)

3 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:529:34)

4 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:387:35)

5 _invoke2 (dart:ui/hooks.dart:186:13)

6 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:42:5)

7 _Channel.push (dart:ui/channel_buffers.dart:132:31)

8 ChannelBuffers.push (dart:ui/channel_buffers.dart:329:17)

9 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:599:22)

10 _dispatchPlatformMessage (dart:ui/hooks.dart:89:31)

Before that I've used ICY stream that was running fine.

Examples of the streams are:

I've been looking through the Tizen docs if there are any HLS limitations, but couldn't find anything. My question is: does this plugin support audio HLS streaming?

wanchao-xu commented 1 year ago

audioplayers plugin support HLS audio, This error is caused by timeout when request https://streaming.live365.com/a30478/playlist.m3u8. The audioplayers made a http request to play HLS audio, but if it doesn't get response in 10 seconds, audioplayers of tizen will retry again. After 3 times, audioplayers will abort the operation. I tried other hls audio, audioplayers plugin of tizen can play it successfully.

dan-live365 commented 1 year ago

Hey, thank you very much for the reply! I don't know why the timeout occurs at the moment, as there is no geoblocking added to the stream. Could you provide more info or documentation on which HLS formats that are currently supported on Tizen?

xuelian-bai commented 1 year ago

You can find more details here https://developer.samsung.com/smarttv/develop/specifications/general-specifications.html