我制作了基于角度的网页,可以共享视频,但通过拖动视频元素滚动页面在 iOS17 Safari 浏览器上不起作用。 Chrome 和 Mozilla 运行良好,没有任何问题。
我已在此处附上我的代码。
mvideo.component.html
<div [class]="containerClass" class="custom-video position-relative" *ngIf="src && !isVideoBroken">
<video [src]="src + '#t=0.01'" id="video" [class]="className" (loadedmetadata)="onVideoLoad()" (error)="onVideoError()" playsInline (click)="manage_video_play()">
Sorry, your browser doesn't support embedded videos.
</video>
</div>
mvideo.component.scss
.custom-video {
>video {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
-webkit-overflow-scrolling : touch !important;
overflow: scroll;
}
以下是渲染后的html
<app-mvideo _ngcontent-serverapp-c128="" _nghost-serverapp-c124="">
<div _ngcontent-serverapp-c124="" class="custom-video position-relative ng-star-inserted">
<video _ngcontent-serverapp-c124="" id="video" playsinline class="hide-video-controls radius-12 w-100" src="https://indiefire.io:3306/videos/fanpostvideo/romchos_1696613147607_v09044g40000cgkr01jc77u4hlksm9jg.mp4#t=0.01"> </video>
</div>
</app-mvideo>
我检查了以下文章,但没有帮助。 https://developer.apple.com/forums/thread/740225
iOS 17 上的 Safari 似乎存在错误。
相关的错误报告已在 Safari 的官方错误跟踪器上提交:Safari Bug Report #261563。 Safari 开发团队已解决并修复了该问题。不过,截至目前,Apple 尚未发布包含该错误修复的新 iOS 版本。
与此同时,请考虑查看 Apple 发布的有关即将推出的 iOS 更新的任何公告或发行说明,其中可能包含此特定错误的解决方案。