我应该使用什么技术组合来制作具有新 HTML 5 中的自定义用户界面的视频播放器

发布于 2024-09-24 05:56:13 字数 386 浏览 1 评论 0原文

我现在正在尝试做一些简单的事情。我正在为自闭症儿童制作一个视频播放器。这个想法是:视频播放器在平板电脑(ipad / android)上运行。点击(屏幕上的任意位置)可在播放/暂停之间切换视频状态。

目前,我正在尝试让它仅在 chrome/firefox 浏览器 + PC 组合上运行。我一直在阅读有关编解码器的持续问题,并且熟悉整个开源/付费编解码器问题。现在,我只想将功能落实到位。 设置视频播放器并将其指向正确的来源是轻而易举的事。我想知道什么是捕获点击屏幕上任意位置的用户事件并切换播放状态的好方法。 我想尝试一些新的 HTML5 东西,但技术/选项太多了。有人可以建议我什么库/技术比较合适(jquery/其他一些 js 库)吗?在这样做的过程中,我想探索使用一些我也可以在其他未来项目中使用的库。

感谢您抽出时间。

I am trying to do something simple for now. I am making a video player for autistic kids. The idea being: a video player runs on a tablet (ipad / android). A tap (anywhere on the screen) toggles the video state between play/pause.

For now, I'm trying to get it to just work on a chrome/firefox browser + PC combination. I have been reading about the ongoing issue with codecs, and am familiar with the whole open source/paid codecs problem. Right now, I just want to get the functionality in place.
Setting up a video player and pointing it to the right source is a no-brainer. I was wondering what would be a good way to capture the user event for tapping anywhere on the screen and that toggles the play state.
I wanted to try some of the new HTML5 stuff, but the technologies/options are overwhelming. Can someone suggest me what library/technology would be a good fit ( jquery/ some other js library) ? In doing this, I'd like to explore using some library which I can use in other future projects as well.

Thanks for your time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

沧笙踏歌 2024-10-01 05:56:13

您是否可以将整个 div 包裹起来,并将 onclick 事件附加到在暂停和播放之间触发的 div ?

<script>
var playing = 1;

function togglePlay(){
    if(playing){
       tellVideoPlayerToStop();
       playing = 0;
    } else {
       tellVideoPLayerToStart();
       playing = 1;
    }
}
</script>

<div id="divid" onclick="togglePlay();"> 
  //Video player goes here.
</div>

这过于简单化了,但总体思路是不是?

Could you possibly wrap a div around the entire thing and attach an onclick event to the div that fires between pause and play?

<script>
var playing = 1;

function togglePlay(){
    if(playing){
       tellVideoPlayerToStop();
       playing = 0;
    } else {
       tellVideoPLayerToStart();
       playing = 1;
    }
}
</script>

<div id="divid" onclick="togglePlay();"> 
  //Video player goes here.
</div>

That's overly simplified but the general idea is there non?

寒冷纷飞旳雪 2024-10-01 05:56:13

这里 这是一份值得一看的好清单。它们都有各自的优点和缺点。您只需要选择最适合您需求的库并从那里进行构建。

Here's a nice list to look through. They all have their own advantages and disadvantages. You'll just need to pick the library best suited to your needs and build from there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文