NetrisTV / ti.exoplayer

A native control for playing videos for Titanium. Based on Google ExoPlayer, using Titanium.Media.VideoPlayer API.
Other
17 stars 6 forks source link

Audio only player? #5

Closed AppWerft closed 5 years ago

AppWerft commented 5 years ago

is it possible? Whats about texts inside datastream?

drauggres commented 5 years ago

Hi @AppWerft.

Audio only player? is it possible?

It is possible to start playing audio without creating video view (surfaceType: ExoPlayer.SURFACE_TYPE_NONE), but work in background is not implemented.

Whats about texts inside datastream?

Don't know what exactly do you mean. You should check out ExoPlayer documentation, if it supports what you want, we can make it work here.

AppWerft commented 5 years ago

but work in background is not implemented. what happens if the screen saver comes?

text data stream: metadata

AppWerft commented 5 years ago

What I have to do to add the background functionality? https://github.com/google/ExoPlayer/issues/4482 ?

AppWerft commented 5 years ago

The surfaceType is not part of handleCreationDict(). I don't understand how it works.

drauggres commented 5 years ago

but work in background is not implemented. what happens if the screen saver comes?

Activity stopped -> player released.

What I have to do to add the background functionality?

I would prefer not to implement background functionality in VideoPlayer. This should be part of AudioPlayer (or MediaPlayer) preferably with the same API as Ti.Media one.

About implementation read this: https://google.github.io/ExoPlayer/faqs.html#how-do-i-keep-audio-playing-when-my-app-is-backgrounded

The surfaceType is not part of handleCreationDict(). I don't understand how it works.

https://github.com/NetrisTV/ti.exoplayer/blob/master/app/src/main/java/ru/netris/mobile/exoplayer/TiUIVideoView.java#L190