chore: eliminar contenido y referencias de disney
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
namespace "com.disneyplayer"
|
||||
compileSdk 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.disneyplayer"
|
||||
minSdk 21
|
||||
targetSdk 35
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'org.videolan.android:libvlc-all:3.6.0-eap9'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:label="Disney Player"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="landscape">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,186 +0,0 @@
|
||||
package com.disneyplayer;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.videolan.libvlc.LibVLC;
|
||||
import org.videolan.libvlc.Media;
|
||||
import org.videolan.libvlc.MediaPlayer;
|
||||
import org.videolan.libvlc.interfaces.IVLCVout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class MainActivity extends Activity {
|
||||
|
||||
private SurfaceView surfaceView;
|
||||
private ProgressBar progressBar;
|
||||
private Button playButton;
|
||||
private TextView statusText;
|
||||
private LibVLC libVlc;
|
||||
private MediaPlayer mediaPlayer;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// Create layout programmatically
|
||||
LinearLayout layout = new LinearLayout(this);
|
||||
layout.setOrientation(LinearLayout.VERTICAL);
|
||||
layout.setGravity(android.view.Gravity.CENTER);
|
||||
|
||||
statusText = new TextView(this);
|
||||
statusText.setText("Disney Player Ready");
|
||||
statusText.setTextSize(18);
|
||||
statusText.setPadding(20, 20, 20, 20);
|
||||
|
||||
playButton = new Button(this);
|
||||
playButton.setText("▶ Reproducir Disney+");
|
||||
playButton.setTextSize(18);
|
||||
playButton.setPadding(40, 40, 40, 40);
|
||||
|
||||
progressBar = new ProgressBar(this);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
|
||||
surfaceView = new SurfaceView(this);
|
||||
surfaceView.setVisibility(View.GONE);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
0
|
||||
);
|
||||
params.weight = 1;
|
||||
surfaceView.setLayoutParams(params);
|
||||
|
||||
layout.addView(statusText);
|
||||
layout.addView(progressBar);
|
||||
layout.addView(playButton);
|
||||
layout.addView(surfaceView);
|
||||
|
||||
setContentView(layout);
|
||||
|
||||
Toast.makeText(this, "App iniciada correctamente", Toast.LENGTH_LONG).show();
|
||||
|
||||
playButton.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "Botón presionado", Toast.LENGTH_SHORT).show();
|
||||
playButton.setEnabled(false);
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
statusText.setText("Iniciando reproducción...");
|
||||
|
||||
new Thread(() -> {
|
||||
try {
|
||||
String streamUrl = "https://live-ftc-sa-east-2.media.dssott.com/dvt2=exp=1772064227~url=%2Fgru1%2Fva01%2Fdisneyplus%2Fevent%2F2026%2F02%2F25%2FIndependiente_Medellin_CO_20260225_1771970452022%2F~psid=17da5759-0dba-4eb5-9375-616e2a1b1443~aid=71e116db-825e-477c-b3f4-df5d3f2c8923~did=2e11e811-1ed0-4193-859b-5c4ff40a44c5~country=AR~kid=k02~hmac=9da7486b6390fbbef9a9bf47aac4a6b18fe424f1d0c3c6c8623cf2785e74c60f/gru1/va01/disneyplus/event/2026/02/25/Independiente_Medellin_CO_20260225_1771970452022/ctr-all-hdri-complete.m3u8";
|
||||
String drmKeyId = "4f37dd7a0f4d41b5947f627c0efcf654";
|
||||
String drmKey = "01987a05f2f3ab9b0e245a4f1b36474e";
|
||||
|
||||
Thread.sleep(500); // Small delay to show the toast
|
||||
runOnUiThread(() -> startPlayback(streamUrl, drmKeyId, drmKey));
|
||||
} catch (Exception e) {
|
||||
runOnUiThread(() -> {
|
||||
Toast.makeText(this, "Error: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||
playButton.setEnabled(true);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
});
|
||||
}
|
||||
|
||||
private void startPlayback(String streamUrl, String drmKeyId, String drmKey) {
|
||||
try {
|
||||
releasePlayer();
|
||||
|
||||
ArrayList<String> options = new ArrayList<>();
|
||||
options.add("--network-caching=3000");
|
||||
options.add(":no-cert-check");
|
||||
options.add(":demux=avformat");
|
||||
options.add(":key-format=org.w3.clearkey");
|
||||
options.add(":key=" + drmKeyId + ":" + drmKey);
|
||||
options.add(":http-user-agent=Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36");
|
||||
options.add(":http-referrer=https://sudamericaplay.com/");
|
||||
|
||||
libVlc = new LibVLC(this, options);
|
||||
mediaPlayer = new MediaPlayer(libVlc);
|
||||
|
||||
final Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
mediaPlayer.setEventListener(new MediaPlayer.EventListener() {
|
||||
@Override
|
||||
public void onEvent(MediaPlayer.Event event) {
|
||||
mainHandler.post(() -> {
|
||||
switch (event.type) {
|
||||
case MediaPlayer.Event.Playing:
|
||||
statusText.setText("Reproduciendo...");
|
||||
progressBar.setVisibility(View.GONE);
|
||||
surfaceView.setVisibility(View.VISIBLE);
|
||||
Toast.makeText(MainActivity.this, "Video iniciado", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
|
||||
case MediaPlayer.Event.EncounteredError:
|
||||
statusText.setText("Error de reproducción");
|
||||
progressBar.setVisibility(View.GONE);
|
||||
Toast.makeText(MainActivity.this, "Error al reproducir", Toast.LENGTH_LONG).show();
|
||||
playButton.setEnabled(true);
|
||||
break;
|
||||
|
||||
case MediaPlayer.Event.EndReached:
|
||||
statusText.setText("Video terminado");
|
||||
break;
|
||||
|
||||
case MediaPlayer.Event.Buffering:
|
||||
float buffer = event.getBuffering();
|
||||
if (buffer < 1.0f) {
|
||||
statusText.setText("Buffering: " + (int)(buffer * 100) + "%");
|
||||
} else {
|
||||
statusText.setText("Reproduciendo...");
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Media media = new Media(libVlc, Uri.parse(streamUrl));
|
||||
mediaPlayer.setMedia(media);
|
||||
media.release();
|
||||
|
||||
IVLCVout vout = mediaPlayer.getVLCVout();
|
||||
vout.setVideoView(surfaceView);
|
||||
vout.attachViews();
|
||||
|
||||
mediaPlayer.play();
|
||||
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Error: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||
playButton.setEnabled(true);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void releasePlayer() {
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.stop();
|
||||
mediaPlayer.getVLCVout().detachViews();
|
||||
mediaPlayer.release();
|
||||
mediaPlayer = null;
|
||||
}
|
||||
if (libVlc != null) {
|
||||
libVlc.release();
|
||||
libVlc = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
releasePlayer();
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#000">
|
||||
|
||||
<SurfaceView
|
||||
android:id="@+id/player_surface"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/play_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="▶ Reproducir Disney+"
|
||||
android:textSize="18sp"
|
||||
android:padding="20dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 585 B |
Binary file not shown.
|
Before Width: | Height: | Size: 585 B |
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Disney Player</string>
|
||||
</resources>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="colorPrimary">#FF6200</item>
|
||||
<item name="colorPrimaryDark">#CC4F00</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,21 +0,0 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.5.1'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
android.useAndroidX=true
|
||||
BIN
DisneyPlayer/gradle/wrapper/gradle-wrapper.jar
vendored
BIN
DisneyPlayer/gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -1 +0,0 @@
|
||||
include ':app'
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
## Target State
|
||||
- **New Player**: libvlc for Android (VLC Android SDK)
|
||||
- **DRM Support**: ClearKey DRM for Disney+ streams
|
||||
- **DRM Support**: ClearKey DRM for protected streams
|
||||
- **Preserve**: All existing functionality
|
||||
|
||||
---
|
||||
@@ -365,7 +365,7 @@ protected void onDestroy() {
|
||||
|
||||
## Phase 5: DRM Support (ClearKey)
|
||||
|
||||
### ClearKey DRM Implementation for Disney+
|
||||
### ClearKey DRM Implementation Example
|
||||
|
||||
**New Class: `VlcDrmManager.java`**
|
||||
**Location**: `app/src/main/java/com/streamplayer/VlcDrmManager.java`
|
||||
@@ -379,7 +379,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Handles DRM configuration for VLC Media Player
|
||||
* Supports ClearKey DRM for Disney+ and other streaming services
|
||||
* Supports ClearKey DRM for protected streaming services
|
||||
*/
|
||||
public class VlcDrmManager {
|
||||
|
||||
@@ -454,7 +454,7 @@ public static Map<String, String> extractClearKeyKeys(String html) {
|
||||
|
||||
try {
|
||||
// Pattern to find ClearKey key IDs and keys
|
||||
// Common patterns in Disney+ and similar services
|
||||
// Common patterns in protected streaming services
|
||||
Pattern clearkeyPattern = Pattern.compile(
|
||||
"\"kid\"\\s*:\\s*\"([^\"]+)\".*?\"k\"\\s*:\\s*\"([^\"]+)\"",
|
||||
Pattern.DOTALL
|
||||
@@ -614,7 +614,7 @@ VLC handles HTTP headers differently than ExoPlayer:
|
||||
8. [ ] Close button returns to main activity
|
||||
9. [ ] App handles pause/resume correctly
|
||||
10. [ ] Memory leaks checked (no retained VLC instances)
|
||||
11. [ ] DRM streams play correctly (Disney+)
|
||||
11. [ ] DRM streams play correctly
|
||||
12. [ ] SSL certificate bypass works
|
||||
|
||||
---
|
||||
|
||||
@@ -209,7 +209,7 @@ public final class StreamUrlResolver {
|
||||
return streamUrl;
|
||||
}
|
||||
|
||||
// 6. Patrón: JWPlayer "file": "url.m3u8" (para Disney+ y otros)
|
||||
// 6. Patrón: JWPlayer "file": "url.m3u8" (para reproductores web y otros)
|
||||
streamUrl = extractWithPattern(html, JWPLAYER_FILE_PATTERN);
|
||||
if (isValidStreamUrl(streamUrl)) {
|
||||
return streamUrl;
|
||||
@@ -230,7 +230,6 @@ public final class StreamUrlResolver {
|
||||
// Último recurso: si la URL viene de sudamericaplay.com o similares,
|
||||
// intentar usarla directamente
|
||||
if (pageUrl.contains("sudamericaplay.com") ||
|
||||
pageUrl.contains("disney") ||
|
||||
pageUrl.contains("paramount")) {
|
||||
return pageUrl;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Handles DRM configuration for VLC Media Player
|
||||
* Supports ClearKey DRM for Disney+ and other streaming services
|
||||
* Supports ClearKey DRM for protected streaming services
|
||||
*/
|
||||
public class VlcDrmManager {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user