History check
Please confirm that you've checked issues history and you didn't find anything which may solve your issue.
Describe the bug
I want to skip the video with default position, before applying mvvm pettern in my project it's works perfectly, after applying mvvm pettern when i'm trying to skip video will not play immediately after seek to begin and play again.
History check Please confirm that you've checked issues history and you didn't find anything which may solve your issue.
Describe the bug I want to skip the video with default position, before applying mvvm pettern in my project it's works perfectly, after applying mvvm pettern when i'm trying to skip video will not play immediately after seek to begin and play again.
My Model class ` class VideoService {
var dataSource = BetterPlayerDataSource( BetterPlayerDataSourceType.network, "https://firebasestorage.googleapis.com/v0/b/file-upload-c801a.appspot.com/o/Filhaal2%20Mohabbat%20-%20Akshay%20Kumar%20Ft%20Nupur%20Sanon%20-%20Ammy%20Virk%20-%20BPraak%20-%20Jaani%20-%20Arvindr%20Khaira.mkv?alt=media&token=947fccf2-cfa7-4058-856c-d06172014a91", // "https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_480_1_5MG.mp4", // resolutions: { // "256P": // "https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_480_1_5MG.mp4", // "720P": // "https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_640_3MG.mp4", // "1080P": // "https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_1280_10MG.mp4", // "4K": // "https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_1920_18MG.mp4" // }, notificationConfiguration: BetterPlayerNotificationConfiguration( showNotification: true, title: "Elephant dream", author: "Some author", imageUrl: "https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/African_Bush_Elephant.jpg/1200px-African_Bush_Elephant.jpg", activityName: "MainActivity", ), );
late BetterPlayerConfiguration _configuration; late BetterPlayerController _controller; late BetterPlayerDataSource _dataSource;
Future initializeVideoService() async{
}
BetterPlayerController get controller { return this._controller; } }`
My Repository `class VideoPlayerRepository{
VideoService _videoService=VideoService();
void videoPlayerInitialize()=>_videoService.initializeVideoService();
BetterPlayerController controller () =>_videoService.controller;
}
**ViewModel**
class VideoPlayerViewModel with ChangeNotifier {VideoPlayerRepository _videoPlayerRepository = VideoPlayerRepository(); late BetterPlayerController controller=_videoPlayerRepository.controller();
void videoPlayerInitialize() { _videoPlayerRepository.videoPlayerInitialize(); notifyListeners(); }
}`
My Widget
`class HomePageScreen extends StatefulWidget { @override _HomePageScreenState createState() => _HomePageScreenState(); }
class _HomePageScreenState extends State {
@override void initState() { super.initState(); Provider.of(context,listen: false).videoPlayerInitialize();
// Provider.of(context,listen: false).setController();
// _controller=Provider.of(context).controller;
}
@override void dispose() {
}
@override Widget build(BuildContext context) {
}
}`
Flutter doctor
I/BufferQueueProducer(11652): [SurfaceTexture-0-11652-32](this:0x71070fb800,id:32,api:3,p:11652,c:11652) queueBuffer: slot 4 is dropped, handle=0x71075726c0 D/AudioTrack(11652): pause(): 0x710755f800, mState = 0 V/jhw (11652): call Intent.migrateExtraStreamToClipData(1) V/jhw (11652): call Intent.migrateExtraStreamToClipData(1) W/System (11652): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar I/System.out(11652): e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaHttp D/AudioTrack(11652): stop(): 0x710755f800, mState = 4 D/AudioTrack(11652): ~AudioTrack(): 0x710755f800 D/AudioTrack(11652): stop(): 0x710755f800, mState = 4 W/System (11652): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar I/System.out(11652): e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaHttp I/System.out(11652): [OkHttp] sendRequest>> I/System.out(11652): [OkHttp] sendRequest<< D/AudioTrack(11652): set: Create AudioTrackThread, tid = 22077 D/AudioTrack(11652): Client defaulted notificationFrames to 6000 for frameCount 12000 D/AudioTrack(11652): createTrack_l: 0x710755f800, mCblk = 0x70fb280000, mLatency = 335, mAfLatency = 85, frameCount = 12000, mSampleRate = 48000, mFlags = 0x8, mReqFrameCount = 12000, mNotificationFramesAct = 6000 I/BufferQueueProducer(11652): [SurfaceTexture-0-11652-32](this:0x71070fb800,id:32,api:3,p:11652,c:11652) queueBuffer: fps=2.34 dur=3846.78 max=3202.76 min=18.10 I/AudioTrack-JNI(11652): audioTrack continuously zero data counter >= 10, send pause/stop state to pg, counter: 0 I/AudioTrack(11652): audioTrack continuously zero data counter >= 20, send pause/stop state to pg, counter: 20 D/AudioTrack(11652): start(): 0x710755f800, mState = 1 V/jhw (11652): call Intent.migrateExtraStreamToClipData(1) I/BufferQueueProducer(11652): [SurfaceTexture-0-11652-32](this:0x71070fb800,id:32,api:3,p:11652,c:11652) queueBuffer: slot 13 is dropped, handle=0x7107573380
Better Player version
Smartphone (please complete the following information):