|
1.playModule 模块 ios 设置 自动循环播放 isLoop :true 无效 (我测试能循环播放呢)
2.最新版本 ios background 设置背景图片 无效不显示 (我设置的有效)
3.进入就页面只调用Palyurl 和 init 的情况 下 会触发 addEventListener 监听事件 [Play] 播放事件. (Palyurl接口是在执行play接口后进行切换播放用的,你为什么要用这个呢?)
我测试代码如下,用的playmodule最新版本
- <!DOCTYPE html>
- <html>
- <head>
- <title>Module Develop</title>
- <meta charset="utf-8">
- <meta name="viewport"
- content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
- <style type="text/css">
- html,
- body {
- height: 100%
- }
- body {
- background-color: #fff;
- margin: 0;
- }
- #wrap {
- height: 100%;
- position: relative;
- }
- #header {
- padding-top: 20px;
- background-color: #5082c2;
- height: 44px;
- position: relative;
- }
- #header h1 {
- font-size: 20px;
- height: 44px;
- line-height: 44px;
- margin: 0em;
- color: #fff;
- margin-left: 100px;
- margin-right: 100px;
- text-align: center;
- }
- #main {
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-box-pack: center;
- }
- a.button {
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-box-pack: center;
- -webkit-box-align: center;
- height: 32px;
- margin: 8px;
- background-color: rgba(240, 240, 240, 1.0);
- border-color: rgba(220, 220, 220, 1.0);
- border-width: 2px;
- border-style: solid;
- }
- a.active {
- background-color: rgba(240, 240, 240, 0.7);
- }
- </style>
- </head>
- <body>
- <div id="wrap">
- <div id="main">
- <br />
- <a class="button" tapmode="active" onclick="init()">初始化</a>
- <a class="button" tapmode="active" onclick="play1()">有按钮视频播放</a>
- <br />
- </div>
- </div>
- </body>
- <script type="text/javascript">
- var demo = null;
- apiready = function () {
- demo = api.require('playModule');
- if (!demo) {
- alert("请添加模块后编译");
- return;
- }
- }
- function init() {
- demo.init({
- background: "widget://res/gif1.gif",
- }, function (ret, err) {
- //alert(JSON.stringify(ret));
- });
- }
- function play1() {
- demo.play({
- rect: {
- x: 0,
- y: 100,
- w: api.frameWidth,
- h: api.frameHeight / 3
- },
- fixedOn: api.frameName,
- fixed: true,
- title: "test",
- url: 'https://cms**.**/upload/201803/19/756a7bef-6513-487b-ae9d-c5d7dae644b3.mp4',
- isLoop: true,
- }, function (ret, err) {
- //alert(JSON.stringify(ret));
- });
- }
- </script>
- </html>
复制代码
|
|