2017-06-28 2 views
0

おはようございます。キューポイントex [5、10]を持つFlowplayerビデオがあります。ここで私のビデオは5秒から始まり、10秒で一時停止します。それは動作します。ただし、再生をクリックしてビデオの終了を許可すると、次回(ページ更新なし)ビデオを再生します。最初のキューポイントではなく、最初から開始します。フロープレーンを常にキューポイントから開始する

私はこちらのページをリフレッシュせずに、私はビデオは常に最初のキューポイントから再生することができますどのように、

をヒントやソリューションを感謝コードスニペット

flowplayer(flowplayerObject, { 
     hlsjs: { 
      xhrSetup: function (xhr) { 
      xhr.withCredentials = true; 
      } 
     }, 
     swf: ------, 
     swfHls: -------, 
     clip: { 
      cuepoints:[videoStartTime,videoEndTime], 
      sources: [ 
      {type: "application/x-mpegURL", src: -------l}, 
      {type: "video/mp4", src: -------} 
      ] 
     } 
     }).one("ready", function (e, api, video){ 
     api.seek(parseInt(videoStartTime)); 
     }).on("cuepoint", function (e, api, cuepoint) { 
     if (cuepoint.index === 1) { 
      api.pause(); 
     }; 
     }) ; 

はありがとうございれる:)

答えて

0

ok、少し考えて解決策を見つけた後。アイデアは、ビデオが終了した後、最初のキューポイントだけを探します。カップルラインのみを追加して解決:

flowplayer(flowplayerObject, { 
     hlsjs: { 
      xhrSetup: function (xhr) { 
      xhr.withCredentials = true; 
      } 
     }, 
     swf: ------, 
     swfHls: -------, 
     clip: { 
      cuepoints:[videoStartTime,videoEndTime], 
      sources: [ 
      {type: "application/x-mpegURL", src: -------l}, 
      {type: "video/mp4", src: -------} 
      ] 
     } 
     }).one("ready", function (e, api, video){ 
     api.seek(parseInt(videoStartTime)); 
     }).on("cuepoint", function (e, api, cuepoint) { 
     if (cuepoint.index === 1) { 
      api.pause(); 
     }; 
     }).on("finish", function (e, api) { 
     api.seek(parseInt(videoStartTime)); 
     }); 
関連する問題