如何通过松弛分享视频?



当我通过WhatsUp分享视频时,我实现了共享视频和所有作品。但我注意到,如果我通过 Slack 分享视频,它不会在 Slack 中播放。这意味着我在我的 Slack 帐户中获得了视频文件,单击它,它无法播放......我可以下载这个视频,它会播放,但在 Slack 中它没有。

如果我将视频从标准图库应用程序共享到 Slack,它可以工作......

那么,有什么区别呢?

这是我的共享代码

private fun openShareDialog(iC: Context, //
iPath: String) {
MediaScannerConnection.scanFile(//
iC.applicationContext, //
arrayOf(iPath), null //
) { _, iUri ->
var shareIntent = Intent(Intent.ACTION_SEND)
shareIntent.type = "video/*"
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "title")
shareIntent.putExtra(Intent.EXTRA_TITLE, "title")
shareIntent.putExtra(Intent.EXTRA_STREAM, iUri)
shareIntent = Intent.createChooser(shareIntent, iC.getString(R.string.tetavi_send_to))
shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
iC.startActivity(shareIntent)
}
}
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("*/*");
sharingIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
sharingIntent.putExtra(Intent.EXTRA_SUBJECT, "subject");
sharingIntent.putExtra(Intent.EXTRA_TITLE, "title");
sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file.getAbsolutePath()));
startActivity(Intent.createChooser(sharingIntent, "share file with"));

最新更新