Comments (1)
You'll need to reset the cache each time you modify the playlist and call Encode()
or String()
. We cache these playlists internally for performance reasons, so if you need to encode the playlist multiple times, we only need to do it once (if the playlist hasn't been updated).
But note, any of the methods we provide, such as Append, should already be resetting the cache. I have a pretty large use of this library, and don't need to call ResetCache()
because all the methods handle this for me.
Also fmt.Println(p.Encode().String())
can just be written as fmt.Println(p.String())
as the String()
method already calls Encode()
internally.
I'll close this issue, but feel free to reopen and comment if this doesn't quite answer the question, or a cache isn't being reset when you think it should.
from m3u8.
Related Issues (20)
- Using for range loop to MediaPlaylist.Segments would lead to nil pointer dereference HOT 2
- Fix a report card issues for passing to awesome-go list HOT 1
- M3U8 doesn't play after some time HOT 1
- EXT-X-MEDIA audio missing from VariantParams.Alternatives for master playlist decode HOT 1
- . HOT 2
- MediaPlaylist decode custom tag panic
- m3u8.DecodeFrom panics in case of blank lines in playlist
- I have a SCTE-35 parser...... HOT 1
- SCTE35 - EXT-OATCLS-SCTE35 with EXT-X-CUE-IN
- tag: #EXT-X-MEDIA attribute: CHANNELS is not recognized HOT 1
- Is this repo dead? HOT 3
- program panic when i get the url of media segments HOT 6
- safari play fail bug
- Doesn't handle "Alternatives" correctly inside a master playlist's "variants"
- program panic when I parse the media segments
- Decoding MediaPlaylist panics with error: index out of range [0] with length 0 HOT 2
- Support Tag #EXT-X-IMAGE-STREAM-INF
- set Segment key error
- Duplicate Data Resulting from Custom Tags HOT 2
- move away from RegExp
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m3u8.