resume method
恢复滑滑流播放
适用于 TabBar 切换回来等场景,需要恢复滑滑流播放时调用。
实现方式:
- Android: 通过设置
Fragment.userVisibleHint = true来恢复播放 - iOS: 通过调用
DJXDrawVideoViewController.drawVideoViewControllerDidAppear()SDK专用方法
使用场景:
- ✅ 短时间切换(如 TabBar 切换、临时遮挡)
- ✅ ViewPager 等多页面场景的可见性控制
- ❌ 长时间停止播放建议直接销毁视图,需要时重新创建
Implementation
Future<void> resume() async {
_ensureReady();
try {
await PangrowthContent.resumeDramaSwipeFlow(_swipeFlowId!);
debugPrint('DramaSwipeFlowController: 滑滑流已恢复 - $_swipeFlowId');
} catch (e) {
debugPrint('DramaSwipeFlowController: 恢复滑滑流失败 - $e');
rethrow;
}
}