Update Saqel Platform: 2026-09-08 13:43:36
This commit is contained in:
@@ -71,12 +71,13 @@ class _SocraticVideoPlayerScreenState extends State<SocraticVideoPlayerScreen> w
|
||||
}
|
||||
|
||||
void _initPlayer(String videoUrl, int resumePos, bool shouldPlay) {
|
||||
final effectiveUrl = videoUrl.isNotEmpty
|
||||
? videoUrl
|
||||
: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4';
|
||||
if (videoUrl.isEmpty) {
|
||||
setState(() => _videoInitError = 'لا يوجد رابط فيديو حقيقي لهذا الدرس.');
|
||||
return;
|
||||
}
|
||||
|
||||
_videoController?.dispose();
|
||||
_videoController = VideoPlayerController.networkUrl(Uri.parse(effectiveUrl))
|
||||
_videoController = VideoPlayerController.networkUrl(Uri.parse(videoUrl))
|
||||
..initialize().then((_) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
@@ -401,9 +402,7 @@ class _SocraticVideoPlayerScreenState extends State<SocraticVideoPlayerScreen> w
|
||||
_isVideoInitialized = false;
|
||||
});
|
||||
_initPlayer(
|
||||
state.playbackData.videoUrl.isNotEmpty
|
||||
? state.playbackData.videoUrl
|
||||
: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
|
||||
state.playbackData.videoUrl,
|
||||
state.currentPositionSeconds,
|
||||
true,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user