diff --git a/reader.go b/reader.go index caf021bc..861b9da4 100644 --- a/reader.go +++ b/reader.go @@ -620,10 +620,12 @@ func decodeLineOfMediaPlaylist(p *MediaPlaylist, wv *WV, state *decodingState, l case strings.HasPrefix(line, "#EXT-X-KEY:"): state.listType = MEDIA state.xkey = new(Key) + decryptMethod := "" for k, v := range decodeParamsLine(line[11:]) { switch k { case "METHOD": state.xkey.Method = v + decryptMethod = strings.TrimSpace(v) case "URI": state.xkey.URI = v case "IV": @@ -635,6 +637,10 @@ func decodeLineOfMediaPlaylist(p *MediaPlaylist, wv *WV, state *decodingState, l } } state.tagKey = true + if strings.ToUpper(decryptMethod) == "NONE" { + state.tagKey = false + state.xkey = nil + } case strings.HasPrefix(line, "#EXT-X-MAP:"): state.listType = MEDIA state.xmap = new(Map)