Skip to content

Instantly share code, notes, and snippets.

View halilozel1903's full-sized avatar
πŸ¦…
The rest of the world was black and white πŸ–€ 🀍

Halil Γ–zel halilozel1903

πŸ¦…
The rest of the world was black and white πŸ–€ 🀍
View GitHub Profile
val footballTeam = ArrayList<String>()
footballTeam.add("Besiktas")
footballTeam.add("Fenerbahce")
footballTeam.add("Galatasaray")
footballTeam.add("Trabzonspor")
footballTeam.add(2,"Sivasspor")
for (team in footballTeam){
println(team)
}
val footballTeam = ArrayList<String>()
footballTeam.add("Besiktas")
footballTeam.add("Fenerbahce")
footballTeam.add("Galatasaray")
footballTeam.add("Trabzonspor")
val studentList: ArrayList<Student>
val charList = ArrayList<Char>()
val doubleList = ArrayList<Double>()
val arrayList1: ArrayList<String> = ArrayList<String>()
val arrayList2 = ArrayList<String>()
.setDrmConfiguration(MediaItem.DrmConfiguration.Builder(drmSchemeUuid)
.setLicenseUri(drmLicenseUrl).build())
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
val view = binding.root
setContentView(view)
initializePlayer()
}
}
// Prepare the player.
playerView = ExoPlayer.Builder(this)
.setSeekForwardIncrementMs(10000)
.setSeekBackIncrementMs(10000)
.build()
playerView.playWhenReady = true
binding.playerView.player = playerView
playerView.setMediaSource(dashMediaSource, true)
playerView.prepare()
val dashMediaSource =
DashMediaSource.Factory(dashChunkSourceFactory, manifestDataSourceFactory)
.createMediaSource(
MediaItem.Builder()
.setUri(Uri.parse(url))
// DRM Configuration
.setDrmConfiguration(
MediaItem.DrmConfiguration.Builder(drmSchemeUuid)
.setLicenseUri(drmLicenseUrl).build()
)
val defaultHttpDataSourceFactory = DefaultHttpDataSource.Factory()
.setUserAgent(userAgent)
.setTransferListener(
DefaultBandwidthMeter.Builder(this)
.setResetOnNetworkTypeChange(false)
.build()
)
val dashChunkSourceFactory: DashChunkSource.Factory = DefaultDashChunkSource.Factory(
defaultHttpDataSourceFactory)