- 
                Notifications
    
You must be signed in to change notification settings  - Fork 241
 
/
switchChannel.js
28 lines (27 loc) · 1.13 KB
/
switchChannel.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function switchChannel(channelID) {
  var source;
  if (channelID === '1') {
    source = {
      title: 'Art of Motion',
      description: 'What is this event... Parcour?',
      dash: 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd',
      hls: 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8'
    }
  } else if (channelID === '2') {
    source = {
      title: 'Big Buck Bunny',
      description: 'A day in the life of Big Buck Bunny.',
      dash: 'https://cdn.bitmovin.com/content/assets/bbb/stream.mpd',
      hls: 'https://cdn.bitmovin.com/content/assets/bbb/stream.m3u8'
    };
  } else {
    source = {
      title: 'Sintel',
      description: 'The main character, Sintel, is attacked while traveling through a wintry mountainside.',
      dash: 'https://cdn.bitmovin.com/content/assets/sintel/sintel.mpd',
      hls: 'https://cdn.bitmovin.com/content/assets/sintel/hls/playlist.m3u8',
      poster: 'https://cdn.bitmovin.com/content/assets/sintel/poster.png'
    }
  }
  player.load(source);
}