Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
gz_video_player
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蒋俊
gz_video_player
Commits
e311c644
提交
e311c644
authored
10月 20, 2023
作者:
jungleiOS
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
清晰度侧边栏溢出裁剪
上级
82eec7f9
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
61 行增加
和
16 行删除
+61
-16
main.dart
example/lib/main.dart
+19
-1
overflow_test_page.dart
example/lib/overflow_test_page.dart
+25
-0
video.dart
lib/video.dart
+2
-2
video_definition_side_bar.dart
lib/widget/video_definition_side_bar.dart
+15
-13
没有找到文件。
example/lib/main.dart
浏览文件 @
e311c644
...
@@ -12,6 +12,7 @@ import 'package:gz_video_player/video_style.dart';
...
@@ -12,6 +12,7 @@ import 'package:gz_video_player/video_style.dart';
import
'package:gz_video_player/video_subtitles.dart'
;
import
'package:gz_video_player/video_subtitles.dart'
;
import
'package:gz_video_player/video_top_bar_style.dart'
;
import
'package:gz_video_player/video_top_bar_style.dart'
;
import
'package:gz_video_player_example/other_test_page.dart'
;
import
'package:gz_video_player_example/other_test_page.dart'
;
import
'package:gz_video_player_example/overflow_test_page.dart'
;
void
main
(
)
{
void
main
(
)
{
runApp
(
const
MyApp
());
runApp
(
const
MyApp
());
...
@@ -578,7 +579,7 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> {
...
@@ -578,7 +579,7 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> {
// "play_url": "https://mpv.videocc.net/8f38fa3352/c/8f38fa3352029c8ac2af1c90e3bb7cdc_2.mp4",
// "play_url": "https://mpv.videocc.net/8f38fa3352/c/8f38fa3352029c8ac2af1c90e3bb7cdc_2.mp4",
VideoDefinitionItem
(
VideoDefinitionItem
(
dataSource:
dataSource:
'https://mpv.videocc.net/8f38fa3352/c/8f38fa3352029c8ac2af1c90e3bb7cdc_1.mp4'
,
'https://mpv.videocc.net/8f38fa3352/c/8f38fa3352029c8ac2af1c90e3bb7cdc_1.mp4'
,
title:
'LD'
,
title:
'LD'
,
),
),
VideoDefinitionItem
(
VideoDefinitionItem
(
...
@@ -594,6 +595,23 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> {
...
@@ -594,6 +595,23 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> {
),
),
),
),
),
),
SliverToBoxAdapter
(
child:
Center
(
child:
CustomBtn
(
title:
'overflow page'
,
onTap:
()
{
videoPlayerController
?.
pause
();
Navigator
.
of
(
context
).
push
(
MaterialPageRoute
(
builder:
(
BuildContext
context
)
{
return
const
OverflowTestPage
();
},
),
);
},
),
),
),
],
],
),
),
)
)
...
...
example/lib/overflow_test_page.dart
0 → 100644
浏览文件 @
e311c644
import
'package:flutter/material.dart'
;
import
'package:gz_video_player/video.dart'
;
class
OverflowTestPage
extends
StatelessWidget
{
const
OverflowTestPage
({
super
.
key
});
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'overflowTestPage'
),
),
body:
Container
(
width:
300
,
height:
200
,
color:
Colors
.
blue
,
child:
GZVideoPlayer
(
dataSource:
'https://mpv.videocc.net/8f38fa3352/5/8f38fa3352cdb65e6773173ae8c767b5_1.mp4'
,
sourceType:
DataSourceType
.
network
,
),
),
);
}
}
lib/video.dart
浏览文件 @
e311c644
...
@@ -457,8 +457,8 @@ class GZVideoPlayerState extends State<GZVideoPlayer>
...
@@ -457,8 +457,8 @@ class GZVideoPlayerState extends State<GZVideoPlayer>
_controller
.
seekTo
(
position
);
_controller
.
seekTo
(
position
);
Future
.
delayed
(
const
Duration
(
milliseconds:
1500
),
()
{
Future
.
delayed
(
const
Duration
(
milliseconds:
1500
),
()
{
_controller
.
setPlaybackSpeed
(
_speedItem
.
speed
);
_controller
.
setPlaybackSpeed
(
_speedItem
.
speed
);
debugPrint
(
//
debugPrint(
'-----> playbackSpeed =
${_controller.value.playbackSpeed}
'
);
//
'-----> playbackSpeed = ${_controller.value.playbackSpeed}');
});
});
}
else
{
}
else
{
_controller
.
seekTo
(
position
);
_controller
.
seekTo
(
position
);
...
...
lib/widget/video_definition_side_bar.dart
浏览文件 @
e311c644
...
@@ -100,19 +100,21 @@ class _VideoDefinitionSideBarState extends State<VideoDefinitionSideBar>
...
@@ -100,19 +100,21 @@ class _VideoDefinitionSideBarState extends State<VideoDefinitionSideBar>
onTap:
()
{
onTap:
()
{
_controller
.
reverse
();
_controller
.
reverse
();
},
},
child:
Align
(
child:
ClipRRect
(
alignment:
Alignment
.
centerRight
,
child:
Align
(
child:
SlideTransition
(
alignment:
Alignment
.
centerRight
,
position:
_offsetAnimation
,
child:
SlideTransition
(
child:
Container
(
position:
_offsetAnimation
,
width:
width
,
child:
Container
(
color:
Colors
.
black
.
withOpacity
(
0.6
),
width:
width
,
alignment:
Alignment
.
center
,
color:
Colors
.
black
.
withOpacity
(
0.6
),
child:
SingleChildScrollView
(
alignment:
Alignment
.
center
,
child:
Column
(
child:
SingleChildScrollView
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
_renderItems
(),
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
_renderItems
(),
),
),
),
),
),
),
),
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论