longitachi / ZLPhotoBrowser

Wechat-like image picker. Support select photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;
MIT License
4.71k stars 950 forks source link

Fix Audio session #863

Closed patryk-sredzinski closed 8 months ago

patryk-sredzinski commented 9 months ago

Audio Session was not working properly. I've ended up having an issue, when I went to gallery, wanted to play a video and it did not have an audio (my mute switch was enabled)

Whenever we need to play video (or from camera or video preview cell) we need to make sure we set up a correct category and we enable the session. We need to make sure we end up the session when we're done.

I've fixed this in this PR.

I was testing having a background music turned on and playing with camera and video preview. Music should stop and restart when we're listening to audio from ZLPhotoBrowser

longitachi commented 8 months ago

Because you haven't synchronized the main branch's code for a long time and haven't resubmitted to update the code in this pull request, I've directly submitted the code from your pull request in this commit. 9586f076e6fdfc67c49699d8a0c95a7a67baa8e7