-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.1.3: Add support for expiry and onTracksUpdated()
- Loading branch information
1 parent
a535376
commit 0ca064a
Showing
5 changed files
with
66 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
rtvi-client-android-daily/src/main/java/ai/rtvi/client/daily/VoiceClientVideoView.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package ai.rtvi.client.daily | ||
|
||
import ai.rtvi.client.types.MediaTrackId | ||
import android.content.Context | ||
import android.util.AttributeSet | ||
import co.daily.model.MediaStreamTrack | ||
import co.daily.view.VideoView | ||
|
||
/** | ||
* Overrides the Daily [VideoView] to allow [MediaTrackId] tracks from the VoiceClient to be | ||
* rendered. | ||
*/ | ||
class VoiceClientVideoView @JvmOverloads constructor( | ||
viewContext: Context, | ||
attrs: AttributeSet? = null, | ||
defStyleAttr: Int = 0, | ||
defStyleRes: Int = 0 | ||
) : VideoView(viewContext, attrs, defStyleAttr, defStyleRes) { | ||
|
||
/** | ||
* Displays the specified [MediaTrackId] in this view. | ||
*/ | ||
var voiceClientTrack: MediaTrackId? | ||
get() = track?.id?.let(::MediaTrackId) | ||
set(value) { | ||
track = value?.id?.let(::MediaStreamTrack) | ||
} | ||
} |