import HLS from 'playbacks/hls'

xit('HLS playback', () => {
  let playback

  beforeEach(() => {
    const options = {src: 'http://example.com/foo.m3u8'}
    playback = new HLS(options)
    playback.setupHls()
    // NOTE: rather than trying to call playback.setupHls, we'll punch a new one in place
    playback.hls = {
      levels: []
    }
    playback.fillLevels()
  })

  it('supports specifying the level', () => {
    // AUTO by default (-1)
    expect(playback.currentLevel).to.equal(-1)

    // Supports other level specification. Should keep track of it
    // on itself and by proxy on the HLS.js object.
    playback.currentLevel = 0
    expect(playback.currentLevel).to.equal(0)
    expect(playback.hls.currentLevel).to.equal(0)
    playback.currentLevel = 1
    expect(playback.currentLevel).to.equal(1)
    expect(playback.hls.currentLevel).to.equal(1)
  })
})

@@ -30,52 +30,986 @@
 s'%0A%0A
-xit('HLS playback', () =%3E %7B%0A  let playback%0A%0A
+describe('HLS playback', () =%3E %7B%0A  let playback%0A%0A  it('should be able to identify it can play resources independently of the file extension case', function() %7B%0A    expect(HLS.canPlay('/relative/video.m3u8')).to.be.true%0A    expect(HLS.canPlay('/relative/VIDEO.M3U8')).to.be.true%0A  %7D)%0A%0A  it('should ensure it does not create an audio tag if audioOnly is not set', function() %7B%0A    let options = %7B src: 'http://example.com/video.m3u8' %7D,%0A      playback = new HLS(options)%0A    expect(playback.tagName).to.be.equal('video')%0A    options = %7B src: 'http://example.com/video.m3u8', mimeType: 'application/x-mpegurl' %7D%0A    playback = new HLS(options)%0A    expect(playback.tagName).to.be.equal('video')%0A  %7D)%0A%0A  it('should play on an audio tag if audioOnly is set', function() %7B%0A    let options = %7B src: 'http://example.com/video.m3u8', playback: %7B audioOnly: true %7D %7D,%0A      playback = new HLS(options)%0A    expect(playback.tagName).to.be.equal('audio')%0A  %7D)%0A%0A  xit('levels', function() %7B%0A  
   be
@@ -1021,24 +1021,26 @@
 ach(() =%3E %7B%0A
+  
     const op
@@ -1084,24 +1084,26 @@
 .m3u8'%7D%0A    
+  
 playback = n
@@ -1118,24 +1118,26 @@
 ptions)%0A    
+  
 playback.set
@@ -1144,16 +1144,18 @@
 upHls()%0A
+  
     // N
@@ -1236,16 +1236,18 @@
 n place%0A
+  
     play
@@ -1265,16 +1265,18 @@
 %7B%0A      
+  
 levels: 
@@ -1282,18 +1282,22 @@
  %5B%5D%0A    
-%7D%0A
+  %7D%0A  
     play
@@ -1312,28 +1312,32 @@
 lLevels()%0A  
+ 
+ 
 %7D)%0A%0A
+  
   it('suppor
@@ -1374,16 +1374,18 @@
 %3E %7B%0A    
+ 
+ 
 // AUTO 
@@ -1400,16 +1400,18 @@
 lt (-1)%0A
+  
     expe
@@ -1454,16 +1454,18 @@
 1)%0A%0A    
+ 
+ 
 // Suppo
@@ -1523,16 +1523,18 @@
  it%0A    
+  
 // on it
@@ -1573,24 +1573,26 @@
 object.%0A    
+ 
+ 
 playback.cur
@@ -1605,16 +1605,18 @@
 vel = 0%0A
+  
     expe
@@ -1653,24 +1653,26 @@
 qual(0)%0A    
+  
 expect(playb
@@ -1701,24 +1701,26 @@
 to.equal(0)%0A
+  
     playback
@@ -1737,24 +1737,26 @@
 vel = 1%0A    
+  
 expect(playb
@@ -1785,16 +1785,18 @@
 qual(1)%0A
+  
     expe
@@ -1837,16 +1837,23 @@
 qual(1)%0A
+    %7D)%0A
   %7D)%0A%7D)%0A

add canPlay/audioOnly tests