我正在尝试为可穿戴设备开发一个tizen原生应用,用于显示存储在设备中的视频。我不知道如何使用Evas定义显示句柄。有人知道怎么做吗?
答案 0 :(得分:0)
查看API参考的多媒体部分 - https://developer.tizen.org/dev-guide/2.4.0/org.tizen.native.mobile.apireference/group__CAPI__MEDIA__FRAMEWORK.html
答案 1 :(得分:0)
Tizen可穿戴设备支持HTML5。以下是Tizen Documents中的播放和暂停示例。
Link => HTML5 video and audio element: Playing and Managing Multimedia Content
<div align="center">
<h2>Custom Controls : Play & Pause</h2>
<video id="video" src="media/video_sample.mp4" width="340" height="220"></video>
<div>
<!-- video control : button elements -->
<button id="v-play" type="button">
play</button>
<button id="v-pause" type="button" disabled>
pause</button>
</div>
</div>
<script>
var play_button = document.getElementById("v-play");
var pause_button = document.getElementById("v-pause");
play_button.addEventListener("click", function () {
video.play(); //movie play
}, false);
pause_button.addEventListener("click", function () {
video.pause(); //movie pause
}, false);
var video = document.getElementById("video");
video.addEventListener("play", function () {
play_button.disabled = true; //play button disabled
pause_button.disabled = false; //pause button enabled
}, false);
video.addEventListener("pause", function () {
play_button.disabled = false; //play button enabled
pause_button.disabled = true; //pause button disabled
}, false);
video.addEventListener("ended", function () {
play_button.disabled = false; //play button enabled
pause_button.disabled = true; //pause button disabled
}, false);
</script>