提交 b80d6908 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新video示例

上级 143cab0b
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
@fullscreenclick="onFullScreenClick" @controlstoggle="onControlsToggle" @fullscreenchange="onFullScreenChange"> @fullscreenclick="onFullScreenClick" @controlstoggle="onControlsToggle" @fullscreenchange="onFullScreenChange">
</video> </video>
<scroll-view class="uni-padding-wrap uni-common-mt uni-flex-item"> <scroll-view class="uni-padding-wrap uni-common-mt uni-flex-item">
<input class="input" placeholder="输入视频地址播放" @confirm="onSrcInputConfirm"></input>
<view class="uni-btn-v"> <view class="uni-btn-v">
<navigator url="/pages/component/video/video-format"> <navigator url="/pages/component/video/video-format">
<button type="primary" @click="pause">视频格式示例</button> <button type="primary" @click="pause">视频格式示例</button>
...@@ -178,7 +179,7 @@ ...@@ -178,7 +179,7 @@
danmuBtn: false, danmuBtn: false,
enableDanmu: true, enableDanmu: true,
pageGesture: false, pageGesture: false,
direction: -90, direction: -1,
_direction: 0, _direction: 0,
requestFullScreenOptions: { requestFullScreenOptions: {
direction: -90 direction: -90
...@@ -412,6 +413,9 @@ ...@@ -412,6 +413,9 @@
onControlsToggle: function (res : UniVideoControlsToggleEvent) { onControlsToggle: function (res : UniVideoControlsToggleEvent) {
console.log(res.type + " -> " + JSON.stringify(res.detail)); console.log(res.type + " -> " + JSON.stringify(res.detail));
}, },
onSrcInputConfirm(event : UniInputConfirmEvent) {
this.src = event.detail.value;
},
// 自动化测试 // 自动化测试
downloadSource() { downloadSource() {
uni.downloadFile({ uni.downloadFile({
...@@ -434,4 +438,10 @@ ...@@ -434,4 +438,10 @@
width: 100%; width: 100%;
height: 200px; height: 200px;
} }
.input {
height: 40px;
background: #FFF;
margin: 5px 0;
}
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册