在Extjs中播放视频 [英] Play video in Extjs

查看:201
本文介绍了在Extjs中播放视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个项目中将Extjs与PHP(无框架)一起使用.我需要在同一面板/选项卡上播放视频而不打开新的面板/选项卡.我可以通过单击下载按钮或单击面板上显示的视频链接来下载视频.但是我需要在同一页面上播放视频,而又不影响其质量. (通常使用.mp4视频).

I'm using Extjs along with PHP (no framework) in one of my projects. I've a requirement to play video on the same panel/tab without opening a new one. I can download videos by clicking on the download button or clicking on the link to video, present on the panel. But I need to play the video on the same page without affecting it's quality. (Generally using .mp4 videos).

到目前为止,我还没有发现Extjs有任何有用的方法/功能.

I've not found any helpful method/feature with Extjs so far.

推荐答案

我使用ExtJS 4.2建立了一个网站,并提供了一些mp4视频.这很容易.如果您要将视频放置在窗口中,下面的一些代码可能会对您有所帮助.

I set up a website with ExtJS 4.2 and included several mp4 videos. It is pretty easy. If you want to place the video into a window, here is some code that might help you.

window = Ext.widget('window',{
            x:5,
            y:5,
            renderTo: Ext.getBody(),
            width: 410,
            height: 265,
            html: '<video width="400" controls><source src="test.mp4" type="video/mp4"><source src="test.ogg" type="video/ogg"></video>'
    }).show();

这篇关于在Extjs中播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆