将XML播放列表与表达式模板一起使用 [英] Using a XML playlist with Expression Template

查看:50
本文介绍了将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进行更新。

The MediaPlayer control exposes a property "PlayList" that can be updated using JavaScipt.

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

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播放列表与表达式模板一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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