【问题标题】:How to create surface to display videos in Tizen native apps?如何创建表面以在 Tizen 原生应用程序中显示视频?
【发布时间】:2015-12-16 08:30:33
【问题描述】:

我正在尝试为可穿戴设备开发一个 tizen 本机应用程序,以显示存储在设备中的视频。我不知道如何使用 Evas 定义显示句柄。有人知道怎么做吗?

【问题讨论】:

    标签: tizen tizen-wearable-sdk tizen-native-app


    【解决方案1】:
    【解决方案2】:

    Tizen 可穿戴设备支持 HTML5。这是 Tizen 文档中的播放和暂停示例。

    链接 => 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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-06-30
      • 2017-01-31
      • 2019-06-25
      • 2019-05-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多