Exemple #1
0
        public void PatchToRelativeTest_AbsoluteUri()
        {
            var content = @"#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:3
#EXT-X-MEDIA-SEQUENCE:3205244
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXTINF:2.0,
http://wowza-test.domainname.io/liveOriginAbsolute/_definst_/sintel-live.smil/media-uidwhtlta_b1128000_3205244.ts
#EXTINF:2.0,
http://wowza-test.domainname.io/liveOriginAbsolute/_definst_/sintel-live.smil/media-uidwhtlta_b1128000_3205245.ts
#EXTINF:2.0,
http://wowza-test.domainname.io/liveOriginAbsolute/_definst_/sintel-live.smil/media-uidwhtlta_b1128000_3205246.ts
";

            var manifestUri = new Uri("http://wowza-test.domainname.io/liveOriginAbsolute/_definst_/sintel-live.smil/chunklist_b1128000.m3u8");

            var result = AnalyzerUtils.PatchToRelative(manifestUri, content);

            Assert.NotNull(result);
            Assert.Equal(@"#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:3
#EXT-X-MEDIA-SEQUENCE:3205244
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXTINF:2.0,
media-uidwhtlta_b1128000_3205244.ts
#EXTINF:2.0,
media-uidwhtlta_b1128000_3205245.ts
#EXTINF:2.0,
media-uidwhtlta_b1128000_3205246.ts
", result);
        }
Exemple #2
0
        public void PatchToRelativeTest_NoUri()
        {
            var content     = "Nothing important\nAt all";
            var manifestUri = new Uri("http://localhost");

            var result = AnalyzerUtils.PatchToRelative(manifestUri, content);

            Assert.Null(result);
        }