您好,
我正在尝试将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播放列表与表达式模板一起使用
发布评论