재생 목록의 다음 항목이 jwplayer 6.8에로드 될 때마다 관련 비디오를 동적으로 변경합니다.

Skwal

재생 목록의 다음 항목이로드 될 때마다 관련 동영상을 동적으로 변경할 수있는 방법이 있나요? 재생 목록 자체를 처리 할 수있는 것과 비슷합니다.

다음과 같이하고 싶습니다.

player.onPlaylistItem(function(e) {

    player.load([{related: {
        file: "/assets/related.xml"
    }]);

});
emaxsaun

이것은 미디어 ID를 사용하여 수행 할 수 있습니다.

http://www.longtailvideo.com/support/jw-player/28858/displaying-related-videos

Media ID Replacement

The Media ID Replacement feature allows JW Player to dynamically construct URLs to related videos RSS feeds. This is required in two situations:

    If you have a playlist with multiple videos and want to display related videos for each item.
    If you set the onclick option to play and want to display related videos of related videos.

Here is an example embed using a simple playlist with 2 items:

  jwplayer("container").setup({
    playlist: [{ 
       file: "/videos/12345.mp4",
       mediaid: "12345"
    },{
       file: "/videos/67890.mp4",
       mediaid: "67890"
    }],
    related: {
      file: "/related/MEDIAID.xml"
   }
 });

For the first item in the playlist, JW Player will request the RSS feed /related/12345.xml. For the second item, JW Player will request the feed /related/67890.xml.

If the items in these RSS feeds also contain a mediaid (using the guid element), JW Player is able to in turn construct a related videos URL and display related videos of these related videos:

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <item>
      <title>Big Buck Bunny</title>
      <guid isPermalink="false">28839</guid>
      <media:thumbnail url="http://example.com/thumbs/28839.jpg"/>
      <media:content url="http://example.com/videos/28839.mp4" type="video/mp4" />
    </item>

    <item>
      <title>Elephant's Dream</title>
      <guid isPermalink="false">8791</guid>
      <media:thumbnail url="http://example.com/thumbs/8791.jpg"/>
      <media:content url="http://example.com/videos/8791.mp4" type="video/mp4" />
    </item>
  </channel>
</rss>

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관