Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
What to Upload to SlideShare
Next

Share

ExoPlayerで最適な視聴体験を届けるために / AbemaTV DevCon 2018 TrackB Session B4

視聴体験向上のために行っているExoPlayer関連のTipsについてお話します。

Related Books

Free with a 30 day trial from Scribd

See all

ExoPlayerで最適な視聴体験を届けるために / AbemaTV DevCon 2018 TrackB Session B4

  1. 1. #EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=300000 http://mycompany.com/240p.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1400000 http://mycompany.com/480p.m3u8 … … #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=2400000 http://mycompany.com/720p.m3u8 … …
  2. 2. #EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=300000 http://mycompany.com/240p.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1400000 http://mycompany.com/480p.m3u8 … … #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=2400000 http://mycompany.com/720p.m3u8 … …
  3. 3. #EXT-X-VERSION:3 #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:1 #EXTINF:10.0, http://media.example.com/segment1.ts #EXTINF:9.0, http://media.example.com/segment2.ts …
  4. 4. #EXT-X-VERSION:3 #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:1 #EXTINF:10.0, http://media.example.com/segment1.ts #EXTINF:9.0, http://media.example.com/segment2.ts …
  5. 5.
  6. 6. public interface BandwidthMeter { … /** Returns the estimated bandwidth in bits/sec. */ long getBitrateEstimate(); … }
  7. 7. class AbemaBandwidthMeter( private val default: DefaultBandwidthMeter ) : BandwidthMeter by default, TransferListener<Any> by default { private var limitBitrate = Long.MAX_VALUE override fun getBitrateEstimate(): Long { return Math.min(default.bitrateEstimate, limitBitrate) } fun setLimitBitrate(limitBitrate: Long) { this.limitBitrate = limitBitrate } }
  8. 8. class AbemaBandwidthMeter( private val default: DefaultBandwidthMeter ) : BandwidthMeter by default, TransferListener<Any> by default { private var limitBitrate = Long.MAX_VALUE override fun getBitrateEstimate(): Long { return Math.min(default.bitrateEstimate, limitBitrate) } fun setLimitBitrate(limitBitrate: Long) { this.limitBitrate = limitBitrate } } override fun getBitrateEstimate(): Long { return Math.min(default.bitrateEstimate, limitBitrate) }
  9. 9. private fun stopVideo() { … sendPlayerLog(); } private fun sendPlayerLog() { // send log here } private fun pauseVideo() { … sendPlayerLog(); } private val programMetaChanged = { meta -> if (shouldSend) sendPlayerLog() };
  10. 10. private fun stopVideo() { … sendPlayerLog(); } private fun sendPlayerLog() { // send log here }} private fun pauseVideo() { … sendPlayerLog(); } private val programMetaChanged = { meta -> if (shouldSend) sendPlayerLog() }; ✘ ✘
  11. 11. private fun sendPlayerLog() { // send log here }} @Override public void onCreate(Bundle b) { super.onCreate(b); … val logTracker = PlayerLogTracker(…) player.addTrackers( logTracker, … ) } class PlayerLogTracker( metadataDetector: MetadataDetector, stateDetector: PlaybackStateDetector, sendPlayerLog: () -> Unit ) { // call sendPlayerLog() }
  12. 12. private fun sendPlayerLog() { // send log here } @Override public void onCreate(Bundle b) { super.onCreate(b); … val logTracker = PlayerLogTracker(…) player.addTrackers( logTracker, … ) } class PlayerLogTracker( metadataDetector: MetadataDetector, stateDetector: PlaybackStateDetector, sendPlayerLog: () -> Unit ) { // call sendPlayerLog() } ✔ ✔ ✔
  13. 13. ✔ ✔ ✔
  • moriyasatoshi

    Nov. 18, 2018
  • syuichitsuji

    Oct. 17, 2018

視聴体験向上のために行っているExoPlayer関連のTipsについてお話します。

Views

Total views

3,697

On Slideshare

0

From embeds

0

Number of embeds

2,867

Actions

Downloads

0

Shares

0

Comments

0

Likes

2

×