Skip to content

Instantly share code, notes, and snippets.

View yusufcakmak's full-sized avatar
🏠
Working from home

Yusuf Cakmak yusufcakmak

🏠
Working from home
View GitHub Profile
compile 'com.google.android.exoplayer:exoplayer:r2.X.X'
@yusufcakmak
yusufcakmak / build.gradle
Last active December 1, 2018 14:12
exogradlemodules
implementation 'com.google.android.exoplayer:exoplayer-core:2.X.X'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.X.X'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.X.X'
<com.yusufcakmak.exoplayersample.customview.CustomExoPlayerView
android:id="@+id/custom_player_view"
android:focusable="true"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
private void updatePlayPauseButton() {
if (!isVisible() || !isAttachedToWindow) {
return;
}
boolean playing = player != null && player.getPlayWhenReady();
String contentDescription = getResources().getString(
playing ? com.google.android.exoplayer2.R.string.exo_controls_pause_description : com.google.android.exoplayer2.R.string.exo_controls_play_description);
playButton.setContentDescription(contentDescription);
playButton.setImageResource(
playing ? R.drawable.pausecontrol : R.drawable.playcontrol);
@yusufcakmak
yusufcakmak / gist:b19371a0c9c22f5c04ff8b461b422ffd
Created November 17, 2016 20:18 — forked from iammert/gist:faa6cd996c752dcfb10a
update gitignore already commited
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
git push origin master
extractorsFactory = new DefaultExtractorsFactory();
MediaSource mediaSource = new ExtractorMediaSource(Uri.parse("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"),
mediaDataSourceFactory, extractorsFactory, null, null);
simpleExoPlayerView = (SimpleExoPlayerView) findViewById(R.id.player_view);
simpleExoPlayerView.requestFocus();
simpleExoPlayerView.setPlayer(player);
MediaSource mediaSource = new HlsMediaSource(Uri.parse("https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8"),
mediaDataSourceFactory, mainHandler, null);
player.prepare(mediaSource);
player.setPlayWhenReady(true);
mediaSource = new ExtractorMediaSource(Uri.parse(radioUrl),
dataSourceFactory,
extractorsFactory,
null,
null);
player.prepare(mediaSource);
public class JavaMap {
public static void main(String[] args) {
// Takımları temsil eden kısaltmaları ve isimleri ile Map oluşturuyoruz. Böylece her takım kısaltmasına karşılık takım ismi gelecek.
// put metotu ile ekleme yapıyoruz.
Map<String, String> teamMap = new HashMap<>();
teamMap.put("bjk","Besiktas");
teamMap.put("gs","Galatasaray");
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>Thymeleaf Example</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>