Small changes and fixes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d2d668a93f
commit
40dec8832d
3 changed files with 14 additions and 7 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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 = { }) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue