【HarmonyOS】【xml】使用xml绘制视频播放控制栏

本文记录HarmonyOS使用xml绘制视频播放控制栏

效果图如下

代码如下

点击查看代码
<?xml version="1.0" encoding="utf-8"?>
<!--依赖布局-->
<DependentLayout
    xmlns:ohos="http://schemas.huawei.com/res/ohos"
    ohos:height="match_parent"
    ohos:width="match_parent"
    ohos:background_element="#00000000">
<!--子布局:控制区域-->
    <DirectionalLayout
        ohos:id="$+id:controller_bottom_layout"
        ohos:height="80vp"
        ohos:width="match_parent"
        ohos:align_parent_bottom="true"
        ohos:background_element="#88000000"
        ohos:left_padding="10vp"
        ohos:orientation="vertical"
        ohos:right_padding="10vp">
        <!--子布局:组件-->
        <DependentLayout
            ohos:height="0vp"
            ohos:width="match_parent"
            ohos:weight="2">
<!--上一集-->
            <Image
                ohos:id="$+id:play_backward"
                ohos:height="40vp"
                ohos:width="40vp"
                ohos:right_margin="20vp"
                ohos:left_of="$+id:play_controller"
                ohos:padding="10vp"
                ohos:image_src="$media:ic_backward"
                ohos:scale_mode="stretch"
                />
<!--播放/暂停 按钮-->
            <Image
                ohos:id="$+id:play_controller"
                ohos:height="40vp"
                ohos:width="40vp"
                ohos:horizontal_center="true"
                ohos:image_src="$media:ic_music_stop"
                ohos:scale_mode="stretch"
                />
<!--下一集-->
            <Image
                ohos:id="$+id:play_forward"
                ohos:height="40vp"
                ohos:width="40vp"
                ohos:left_margin="20vp"
                ohos:padding="10vp"
                ohos:right_of="$id:play_controller"
                ohos:image_src="$media:ic_forward"
                ohos:scale_mode="stretch"
                />
<!--投屏图片按钮-->
            <Image
                ohos:id="$+id:tv"
                ohos:height="23vp"
                ohos:width="23vp"
                ohos:align_parent_right="true"
                ohos:image_src="$media:ic_tv"
                ohos:right_margin="20vp"
                ohos:scale_mode="stretch"
                ohos:vertical_center="true"
                />

        </DependentLayout>
        <!--子布局:进度-->
        <DirectionalLayout
            ohos:height="0vp"
            ohos:width="match_parent"
            ohos:orientation="horizontal"
            ohos:alignment="vertical_center"
            ohos:weight="2">
<!--播放时长-->
            <Text
                ohos:id="$+id:current_time"
                ohos:height="match_content"
                ohos:width="match_content"
                ohos:right_margin="5vp"
                ohos:text="00:00:00"
                ohos:text_color="#ffffff"
                ohos:text_size="12vp"/>
<!--进度条-->
            <Slider
                ohos:id="$+id:progress"
                ohos:height="35vp"
                ohos:width="0vp"
                ohos:orientation="horizontal"
                ohos:progress_color="#FF6103"
                ohos:progress_width="5vp"
                ohos:weight="1"/>
<!--视频总时长-->
            <Text
                ohos:id="$+id:end_time"
                ohos:height="match_content"
                ohos:width="match_content"
                ohos:right_margin="5vp"
                ohos:text="00:00:00"
                ohos:text_color="#ffffff"
                ohos:text_size="12vp"/>

        </DirectionalLayout>

    </DirectionalLayout>

</DependentLayout>
视频XML播放源码 三层结构之下的文章视频管理系统 对以前的视频XML进行更行,增加了简单视频列表和列表视频管理及部署服务器上FLV不能播放等问题. 视频XML播放可以更快的查看视频 index.htm是视频播放页面 对应的XMLXML文件夹中player.xml 采用VS2008+SQ2005 default.aspx是带列表的视频播放页 目录下的list1.xml 后台功能更新 后台添加admin 密码admin 网站常规管理: 基本设置 管理设置 简单视频列表: 简单视频进行管理 添加简单视频功能 列表视频功能管理: 添加列表视频 修改视频(这个传值过去绑定XML节点有点问题,待解决) 删除视频 目分类管理: 大类添加 小类添加 大类列表 小类列表 内容管理: 文章管理 文章添加 解决问题: 国内大多都是Win2003的主机,FLV格式文件上传服务器后不能播放,默认是没有指定输出FLV这种格式的虽然FTP里面可以看见,但无法通过http访问,也就无法播放了。 让IIS支持Flv的详细设置方法: IIS-->网站--->属性--->HTTP性能--->MIME类型--->新建: 扩展名:flv MIME类型:flv-application/octet-stream (我用这个方法就可以正常播放了……) 你必须设置一下内容 1:在“Web服务扩展”中Active Server Pages,Internet 数据连接器,RPC代理服务扩展,以及在服务器端的包含文件都必须置为允许状况 2:“网站”-》属性-》主目录-》配置-》选项-》启动父路径 3:“网站”-》属性-》服务-》在隔离模式中选中“以IIS5.0隔离模式运行WWW服务” 4:开始-》程序-》管理工具-》服务.找到RPC服务,双击-》登录-》允许服务与桌面交互 原来是net默认上传限制是4M, 超过则要在web.config中配置: 需要在web.config 就可以解决
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

萌狼蓝天

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值