Compare commits
2 commits
fe6cb68609
...
40dec8832d
Author | SHA1 | Date | |
---|---|---|---|
40dec8832d | |||
d2d668a93f |
|
@ -8,6 +8,8 @@
|
||||||
<entry key="../../../../../layout/compose-model-1633594045878.xml" value="1.0" />
|
<entry key="../../../../../layout/compose-model-1633594045878.xml" value="1.0" />
|
||||||
<entry key="../../../../../layout/compose-model-1633596772266.xml" value="0.18285472972972974" />
|
<entry key="../../../../../layout/compose-model-1633596772266.xml" value="0.18285472972972974" />
|
||||||
<entry key="../../../../../layout/compose-model-1633601146222.xml" value="0.18285472972972974" />
|
<entry key="../../../../../layout/compose-model-1633601146222.xml" value="0.18285472972972974" />
|
||||||
|
<entry key="../../../../../layout/compose-model-1633617799626.xml" value="0.3095439189189189" />
|
||||||
|
<entry key="../../../../../layout/compose-model-1633617944748.xml" value="0.4962962962962963" />
|
||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
@ -18,7 +20,7 @@
|
||||||
<option name="HEAP_SIZE" value="256" />
|
<option name="HEAP_SIZE" value="256" />
|
||||||
<option name="LOCALE" value="en" />
|
<option name="LOCALE" value="en" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@drawable/ic_caster_logo"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@drawable/ic_caster_logo"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.Caster">
|
android:theme="@style/Theme.Caster">
|
||||||
<activity
|
<activity
|
||||||
|
|
|
@ -56,13 +56,13 @@ class ChromecastManagerActivity : ComponentActivity() {
|
||||||
|
|
||||||
val streamInfo = _streamInfo as VideoInfo
|
val streamInfo = _streamInfo as VideoInfo
|
||||||
val status = chromeCast.status
|
val status = chromeCast.status
|
||||||
if (chromeCast.isAppAvailable("CC1AD845") && !status.isAppRunning(
|
if (chromeCast.isAppAvailable(ChromeCastHelper.APP_MEDIA_RECEIVER) && !status.isAppRunning(
|
||||||
"CC1AD845"
|
ChromeCastHelper.APP_MEDIA_RECEIVER
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
val app: Application = chromeCast.launchApp("CC1AD845")
|
val app: Application = chromeCast.launchApp(ChromeCastHelper.APP_MEDIA_RECEIVER)
|
||||||
}
|
}
|
||||||
while (!chromeCast.status.isAppRunning("CC1AD845")) {
|
while (!chromeCast.status.isAppRunning(ChromeCastHelper.APP_MEDIA_RECEIVER)) {
|
||||||
delay(100)
|
delay(100)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,6 +129,9 @@ class ChromecastManagerActivity : ComponentActivity() {
|
||||||
) {
|
) {
|
||||||
Text(text = "Cast")
|
Text(text = "Cast")
|
||||||
}
|
}
|
||||||
|
if(castEnabled.not()){
|
||||||
|
CircularProgressIndicator()
|
||||||
|
}
|
||||||
playBackControl()
|
playBackControl()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,7 +165,7 @@ class ChromecastManagerActivity : ComponentActivity() {
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun playBackControl(){
|
fun playBackControl(){
|
||||||
Row() {
|
Row {
|
||||||
|
|
||||||
IconButton(onClick = {
|
IconButton(onClick = {
|
||||||
GlobalScope.launch(IO) {
|
GlobalScope.launch(IO) {
|
||||||
|
@ -214,7 +217,8 @@ class ChromecastManagerActivity : ComponentActivity() {
|
||||||
}
|
}
|
||||||
IconButton(onClick = {
|
IconButton(onClick = {
|
||||||
GlobalScope.launch(IO) {
|
GlobalScope.launch(IO) {
|
||||||
chromeCast.stopApp()
|
if(chromeCast.runningApp != null)
|
||||||
|
chromeCast.stopApp()
|
||||||
}
|
}
|
||||||
}) {
|
}) {
|
||||||
Icon(
|
Icon(
|
||||||
|
|
|
@ -19,6 +19,7 @@ import androidx.compose.material.icons.filled.Share
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.yausername.youtubedl_android.YoutubeDL
|
import com.yausername.youtubedl_android.YoutubeDL
|
||||||
|
@ -134,7 +135,7 @@ class ShareRecieverActivity : ComponentActivity() {
|
||||||
fun MenuBar() {
|
fun MenuBar() {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = {
|
title = {
|
||||||
Text("Caster")
|
Text(stringResource(id = R.string.title_activity_share_reciever))
|
||||||
},
|
},
|
||||||
navigationIcon = {
|
navigationIcon = {
|
||||||
IconButton(onClick = { }) {
|
IconButton(onClick = { }) {
|
||||||
|
|
BIN
app/src/main/res/drawable-hdpi/ic_caster_logo.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_caster_logo.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-v24/drawable-hdpi/ic_caster_logo.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-v24/drawable-mdpi/ic_caster_logo.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-v24/drawable-xhdpi/ic_caster_logo.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/drawable-v24/drawable-xxhdpi/ic_caster_logo.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.9 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_caster_logo.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_caster_logo.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_caster_logo.png
Normal file
After Width: | Height: | Size: 3.9 KiB |