webapi: github.com/gowebapi/webapi/media/session Index | Files

package session

import "github.com/gowebapi/webapi/media/session"

Package session is to show customized media metadata on platform UI, customize available platform media controls, and access platform media keys such as hardware keys found on keyboards, headsets, remote controls, and software keys found in notification areas and on lock screens of mobile devices.

Index

Package Files

doc.go session.go

type MediaImage Uses

type MediaImage struct {
    Src   string
    Sizes string
    Type  string
}

dictionary: MediaImage

func MediaImageFromJS Uses

func MediaImageFromJS(value js.Wrapper) *MediaImage

MediaImageFromJS is allocating a new MediaImage object and copy all values from input javascript object

func (*MediaImage) JSValue Uses

func (_this *MediaImage) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type MediaMetadata Uses

type MediaMetadata struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: MediaMetadata

func MediaMetadataFromJS Uses

func MediaMetadataFromJS(value js.Wrapper) *MediaMetadata

MediaMetadataFromJS is casting a js.Wrapper into MediaMetadata.

func NewMediaMetadata Uses

func NewMediaMetadata(init *MediaMetadataInit) (_result *MediaMetadata)

func (*MediaMetadata) Album Uses

func (_this *MediaMetadata) Album() string

Album returning attribute 'album' with type string (idl: DOMString).

func (*MediaMetadata) Artist Uses

func (_this *MediaMetadata) Artist() string

Artist returning attribute 'artist' with type string (idl: DOMString).

func (*MediaMetadata) Artwork Uses

func (_this *MediaMetadata) Artwork() *javascript.FrozenArray

Artwork returning attribute 'artwork' with type javascript.FrozenArray (idl: FrozenArray).

func (*MediaMetadata) JSValue Uses

func (_this *MediaMetadata) JSValue() js.Value

func (*MediaMetadata) SetAlbum Uses

func (_this *MediaMetadata) SetAlbum(value string)

SetAlbum setting attribute 'album' with type string (idl: DOMString).

func (*MediaMetadata) SetArtist Uses

func (_this *MediaMetadata) SetArtist(value string)

SetArtist setting attribute 'artist' with type string (idl: DOMString).

func (*MediaMetadata) SetArtwork Uses

func (_this *MediaMetadata) SetArtwork(value *javascript.FrozenArray)

SetArtwork setting attribute 'artwork' with type javascript.FrozenArray (idl: FrozenArray).

func (*MediaMetadata) SetTitle Uses

func (_this *MediaMetadata) SetTitle(value string)

SetTitle setting attribute 'title' with type string (idl: DOMString).

func (*MediaMetadata) Title Uses

func (_this *MediaMetadata) Title() string

Title returning attribute 'title' with type string (idl: DOMString).

type MediaMetadataInit Uses

type MediaMetadataInit struct {
    Title   string
    Artist  string
    Album   string
    Artwork []*MediaImage
}

dictionary: MediaMetadataInit

func MediaMetadataInitFromJS Uses

func MediaMetadataInitFromJS(value js.Wrapper) *MediaMetadataInit

MediaMetadataInitFromJS is allocating a new MediaMetadataInit object and copy all values from input javascript object

func (*MediaMetadataInit) JSValue Uses

func (_this *MediaMetadataInit) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type MediaSession Uses

type MediaSession struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: MediaSession

func MediaSessionFromJS Uses

func MediaSessionFromJS(value js.Wrapper) *MediaSession

MediaSessionFromJS is casting a js.Wrapper into MediaSession.

func (*MediaSession) JSValue Uses

func (_this *MediaSession) JSValue() js.Value

func (*MediaSession) Metadata Uses

func (_this *MediaSession) Metadata() *MediaMetadata

Metadata returning attribute 'metadata' with type MediaMetadata (idl: MediaMetadata).

func (*MediaSession) PlaybackState Uses

func (_this *MediaSession) PlaybackState() MediaSessionPlaybackState

PlaybackState returning attribute 'playbackState' with type MediaSessionPlaybackState (idl: MediaSessionPlaybackState).

func (*MediaSession) SetActionHandler Uses

func (_this *MediaSession) SetActionHandler(action MediaSessionAction, handler *MediaSessionActionHandler)

func (*MediaSession) SetMetadata Uses

func (_this *MediaSession) SetMetadata(value *MediaMetadata)

SetMetadata setting attribute 'metadata' with type MediaMetadata (idl: MediaMetadata).

func (*MediaSession) SetPlaybackState Uses

func (_this *MediaSession) SetPlaybackState(value MediaSessionPlaybackState)

SetPlaybackState setting attribute 'playbackState' with type MediaSessionPlaybackState (idl: MediaSessionPlaybackState).

type MediaSessionAction Uses

type MediaSessionAction int

enum: MediaSessionAction

const (
    PlayMediaSessionAction MediaSessionAction = iota
    PauseMediaSessionAction
    SeekbackwardMediaSessionAction
    SeekforwardMediaSessionAction
    PrevioustrackMediaSessionAction
    NexttrackMediaSessionAction
    SkipadMediaSessionAction
)

func MediaSessionActionFromJS Uses

func MediaSessionActionFromJS(value js.Value) MediaSessionAction

MediaSessionActionFromJS is converting a javascript value into a MediaSessionAction enum value.

func (*MediaSessionAction) JSValue Uses

func (this *MediaSessionAction) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (MediaSessionAction) Value Uses

func (this MediaSessionAction) Value() string

Value is converting this into javascript defined string value

type MediaSessionActionHandler Uses

type MediaSessionActionHandler js.Func

MediaSessionActionHandler is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func MediaSessionActionHandlerToJS Uses

func MediaSessionActionHandlerToJS(callback MediaSessionActionHandlerFunc) *MediaSessionActionHandler

type MediaSessionActionHandlerFunc Uses

type MediaSessionActionHandlerFunc func()

callback: MediaSessionActionHandler

func MediaSessionActionHandlerFromJS Uses

func MediaSessionActionHandlerFromJS(_value js.Value) MediaSessionActionHandlerFunc

type MediaSessionPlaybackState Uses

type MediaSessionPlaybackState int

enum: MediaSessionPlaybackState

const (
    NoneMediaSessionPlaybackState MediaSessionPlaybackState = iota
    PausedMediaSessionPlaybackState
    PlayingMediaSessionPlaybackState
)

func MediaSessionPlaybackStateFromJS Uses

func MediaSessionPlaybackStateFromJS(value js.Value) MediaSessionPlaybackState

MediaSessionPlaybackStateFromJS is converting a javascript value into a MediaSessionPlaybackState enum value.

func (*MediaSessionPlaybackState) JSValue Uses

func (this *MediaSessionPlaybackState) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (MediaSessionPlaybackState) Value Uses

func (this MediaSessionPlaybackState) Value() string

Value is converting this into javascript defined string value

type Union Uses

type Union struct {
    Value js.Value
}

func UnionFromJS Uses

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue Uses

func (u *Union) JSValue() js.Value

Package session imports 2 packages (graph) and is imported by 1 packages. Updated 2019-09-19. Refresh now. Tools for package owners.