VODLIX

Dynamic Content Switch — player.loadContent()

Click any card to swap source, poster, metadata, ads, stats, age rating, skip intro, and chapters — all without destroying or reloading the player.

Events will appear here…

// One-time player init
const player = new VodlixPlayer('player-wrap', {
  sources: [{ src: '…' }],
  poster:  '…',
  autoplay: true,
  muted:    true,
});

// Swap content — no page reload, no player destroy
// Supported fields: sources, poster, content, ads, autoplay,
//   captions, statsHost, statString, live, ageContentRating,
//   skipIntro, skipOutro, chapters, sprites, upnext
player.loadContent({
  sources: [{ src: 'https://…/new-video.m3u8' }],
  poster:  'https://…/new-poster.jpg',
  content: { videoid: 42, title: 'New Movie', duration: 3600 },
  ads:     { adTag: 'https://…/preroll.xml' },
  ageContentRating: { enabled: true, ageRating: 'PG-13', contentRatings: ['violence'] },
  skipIntro: { start: 10, end: 90 },
  autoplay: true,
});

// Listen for the content switch event
player.on('contentchange', (data) => {
  console.log('Content changed', data);
});