According to the HTML spec section on media elements:
Media elements that are potentially playing while not in a document must not play any video, but should play any audio component. Media elements must not stop playing just because all references to them have been removed; only once a media element is in a state where no further audio could ever be played by that element may the element be garbage collected.
However, I have tested creating video elements in js and playing them in Chrome, Safari, and Firefox and they have all worked without them being appended to the document. Are these browsers not following the spec? Or am I interpreting the spec wrong?
I ask because I want to extract frames from a video by seeking through it and painting the frames to a canvas. Ideally, this would all be done in js without having to append the video to the DOM. However, I do not want to do this if it is against the spec, as it might change in the future and my implementation might break.