streaming

Media streaming and broadcast systems in Go
Log | Files | Refs | README | LICENSE

duration_test.go (901B)


      1 package cair
      2 
      3 import "time"
      4 
      5 var fakePlaylist []Item = []Item{
      6 	Item{
      7 		Name:     "Health insuranace",
      8 		Duration: 30 * time.Second,
      9 		// started 5 seconds ago
     10 		ScheduledAt:  time.Now().UTC().Add(-5 * time.Second),
     11 		ThirdPartyId: "C00000000",
     12 	},
     13 	Item{
     14 		Name:     "Delicious beverage",
     15 		Duration: 15 * time.Second,
     16 		// current item duration minus its progress
     17 		ScheduledAt:  time.Now().UTC().Add((30 - 5) * time.Second),
     18 		ThirdPartyId: "C00000000",
     19 	},
     20 	Item{
     21 		Name:     "Interesting Series",
     22 		Duration: 30 * time.Second,
     23 		// current item, minus progress, plus next item
     24 		ScheduledAt:  time.Now().UTC().Add((30 - 5 + 15) * time.Second),
     25 		ThirdPartyId: "P00000000",
     26 	},
     27 	Item{
     28 		Name:     "The News",
     29 		Duration: 15 * time.Minute,
     30 		// current item, minus progress, plus next items
     31 		ScheduledAt:  time.Now().UTC().Add((30 - 5 + 15 + 30) * time.Second),
     32 		ThirdPartyId: "T00000000",
     33 	},
     34 }