VideoManager+ringtone.m 743 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // VideoManager+ringtone.m
  3. // SikeyComm
  4. //
  5. // Created by 刘振兴 on 2024/5/7.
  6. // Copyright © 2024 BaH Cy. All rights reserved.
  7. //
  8. #import "VideoManager+ringtone.h"
  9. #import "AudioSound.h"
  10. @implementation VideoManager (ringtone)
  11. - (void)playVideoWaitingRingtone {
  12. dispatch_async(dispatch_get_main_queue(), ^{
  13. [[AudioSound shardInstance] playSound:@"video_start" ofType:@"mp3" isLoops:-1];
  14. });
  15. }
  16. - (void)playVideoFinishRingtone {
  17. dispatch_async(dispatch_get_main_queue(), ^{
  18. [[AudioSound shardInstance] playSound:@"video_end" ofType:@"mp3" isLoops:0];
  19. });
  20. }
  21. - (void)stopVideoRingtone {
  22. dispatch_async(dispatch_get_main_queue(), ^{
  23. [[AudioSound shardInstance] stopSound];
  24. });
  25. }
  26. @end