This file contains hidden or 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
val footballTeam = ArrayList<String>() | |
footballTeam.add("Besiktas") | |
footballTeam.add("Fenerbahce") | |
footballTeam.add("Galatasaray") | |
footballTeam.add("Trabzonspor") | |
footballTeam.add(2,"Sivasspor") |
This file contains hidden or 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
for (team in footballTeam){ | |
println(team) | |
} |
This file contains hidden or 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
val footballTeam = ArrayList<String>() | |
footballTeam.add("Besiktas") | |
footballTeam.add("Fenerbahce") | |
footballTeam.add("Galatasaray") | |
footballTeam.add("Trabzonspor") |
This file contains hidden or 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
val studentList: ArrayList<Student> | |
val charList = ArrayList<Char>() | |
val doubleList = ArrayList<Double>() |
This file contains hidden or 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
val arrayList1: ArrayList<String> = ArrayList<String>() | |
val arrayList2 = ArrayList<String>() |
This file contains hidden or 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
.setDrmConfiguration(MediaItem.DrmConfiguration.Builder(drmSchemeUuid) | |
.setLicenseUri(drmLicenseUrl).build()) |
This file contains hidden or 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
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
binding = ActivityMainBinding.inflate(layoutInflater) | |
val view = binding.root | |
setContentView(view) | |
initializePlayer() | |
} | |
} |
This file contains hidden or 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
// 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() |
This file contains hidden or 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
val dashMediaSource = | |
DashMediaSource.Factory(dashChunkSourceFactory, manifestDataSourceFactory) | |
.createMediaSource( | |
MediaItem.Builder() | |
.setUri(Uri.parse(url)) | |
// DRM Configuration | |
.setDrmConfiguration( | |
MediaItem.DrmConfiguration.Builder(drmSchemeUuid) | |
.setLicenseUri(drmLicenseUrl).build() | |
) |
This file contains hidden or 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
val defaultHttpDataSourceFactory = DefaultHttpDataSource.Factory() | |
.setUserAgent(userAgent) | |
.setTransferListener( | |
DefaultBandwidthMeter.Builder(this) | |
.setResetOnNetworkTypeChange(false) | |
.build() | |
) | |
val dashChunkSourceFactory: DashChunkSource.Factory = DefaultDashChunkSource.Factory( | |
defaultHttpDataSourceFactory) |