将XML播放列表与表达式模板一起使用

编程入门 行业动态 更新时间:2024-10-25 09:23:13
本文介绍了将XML播放列表与表达式模板一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好,

我正在尝试将xml文件用作EE3中提供的其中一个模板的播放列表,而不是播放器设置=<播放列表>'模板创建。有一个简单的方法吗?

I'm trying to use a xml file as a playlist for one of the templates provided in EE3 instead of the playerSetting = <playlist>' that the template creates. Is there a simple way to do this?

推荐答案

包含播放器模板的源代码。您可以根据自己的需要进行修改。 "出厂默认值"代码检查"InitParams"用于"播放列表"的项目。 item并解析它从该参数获取的XML以填充播放列表。

The source code for the player template is included. You may modify it to suit your needs. The "factory default" code inspects the "InitParams" item for a "playlist" item and parses the XML it obtains from that parameter to populate the playlist.

MediaPlayer控件公开属性"PlayList"。可以使用JavaScipt进行更新。

TheMediaPlayer control exposesa property "PlayList" that can be updated using JavaScipt.

此外,通过使用Visual Studio和您的C#编程技能,您可以修改播放列表的填充方式。一个简单的修改是从InitParams"播放列表"之外的某个地方获得播放列表XML。参数更复杂的播放列表更新方式 - 例如查询服务器端数据库。

Also by using Visual Studio and your C# programming skills, you can revise the the way the playlist is populated. A simple modification would be to obtain the playlist XML from somewhere other than the InitParams "playlist" parameter. More complex ways of updating the playlist -- say by querying a server side database.

更多推荐

将XML播放列表与表达式模板一起使用

本文发布于:2023-10-17 13:15:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1501027.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:播放列表   表达式   模板   XML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!