source

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypeSupported

func TypeSupported(mine string) bool

TypeSupported returns a Boolean value which is true if the given MIME type is likely to be supported by the current user agent.

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

Buffer represents javascript SourceBuffer from MediaSource. https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer

func BufferOf

func BufferOf(v js.Value) *Buffer

BufferOf returns a buffer.

func (*Buffer) Append

func (buf *Buffer) Append(raw []byte) *Buffer

Append adds bytes to buffer.

func (*Buffer) JSValue

func (buf *Buffer) JSValue() js.Value

JSValue ...

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source represents javascript MediaSource. https://developer.mozilla.org/en-US/docs/Web/API/MediaSource

func New

func New() *Source

New returns a media source.

func (Source) AddSourceBuffer

func (s Source) AddSourceBuffer(mine string) *Buffer

AddSourceBuffer creates a new SourceBuffer of the given MIME type and adds it to the MediaSource's sourceBuffers list.

func (*Source) JSValue

func (s *Source) JSValue() js.Value

JSValue ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL