Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into hailey/add-dimensions…
Browse files Browse the repository at this point in the history
…-share-2
  • Loading branch information
haileyok committed Oct 7, 2024
2 parents ee700ee + 509b37f commit 6ba40c4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 17 deletions.
6 changes: 3 additions & 3 deletions modules/Share-with-Bluesky/ShareViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,16 @@ class ShareViewController: UIViewController {
} catch {}
return nil
}

private func saveVideoWithInfo(_ dataUrl: URL) -> String? {
let ext = String(dataUrl.lastPathComponent.split(separator: ".").last ?? "mp4")
guard let tempUrl = getTempUrl(ext: ext) else {
return nil
}

let data = try? Data(contentsOf: dataUrl)
try? data?.write(to: tempUrl)

guard let track = AVURLAsset(url: dataUrl).tracks(withMediaType: AVMediaType.video).first else {
_ = try? FileManager().removeItem(at: tempUrl)
return nil
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-native-fontawesome": "^0.3.2",
"@haileyok/bluesky-video": "0.1.10",
"@haileyok/bluesky-video": "0.2.2",
"@lingui/react": "^4.5.0",
"@mattermost/react-native-paste-input": "^0.7.1",
"@miblanchard/react-native-slider": "^2.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {useLingui} from '@lingui/react'

import {HITSLOP_30} from '#/lib/constants'
import {useAutoplayDisabled} from '#/state/preferences'
import {useVideoMuteState} from 'view/com/util/post-embeds/VideoVolumeContext'
import {useVideoMuteState} from '#/view/com/util/post-embeds/VideoVolumeContext'
import {atoms as a, useTheme} from '#/alf'
import {useIsWithinMessage} from '#/components/dms/MessageContext'
import {Mute_Stroke2_Corner0_Rounded as MuteIcon} from '#/components/icons/Mute'
Expand Down Expand Up @@ -87,7 +87,7 @@ export const VideoEmbedInnerNative = React.forwardRef(
/>
<VideoControls
enterFullscreen={() => {
videoRef.current?.enterFullscreen()
videoRef.current?.enterFullscreen(true)
}}
toggleMuted={() => {
videoRef.current?.toggleMuted()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, {useCallback, useEffect, useRef, useState} from 'react'

import {isSafari} from '#/lib/browser'
import {useVideoVolumeState} from '../../VideoVolumeContext'

export function useVideoElement(ref: React.RefObject<HTMLVideoElement>) {
Expand Down Expand Up @@ -38,12 +37,6 @@ export function useVideoElement(ref: React.RefObject<HTMLVideoElement>) {
const handleTimeUpdate = () => {
if (!ref.current) return
setCurrentTime(round(ref.current.currentTime) || 0)
// HACK: Safari randomly fires `stalled` events when changing between segments
// let's just clear the buffering state if the video is still progressing -sfn
if (isSafari) {
if (bufferingTimeout) clearTimeout(bufferingTimeout)
setBuffering(false)
}
}

const handleDurationChange = () => {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4120,10 +4120,10 @@
resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861"
integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==

"@haileyok/bluesky-video@0.1.10":
version "0.1.10"
resolved "https://registry.yarnpkg.com/@haileyok/bluesky-video/-/bluesky-video-0.1.10.tgz#2756e8c83a78caeb6b120a175578eac1eb6889a9"
integrity sha512-W8+DNdek+xjAqTO1zmuuSrkVFxDepcP8+Gs8MvIcYSgXEJlpQimZpcMwAduiDI/jZMn/2U6cnMahx7YuiZlZ7g==
"@haileyok/bluesky-video@0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@haileyok/bluesky-video/-/bluesky-video-0.2.2.tgz#062ef6f52376f2f8e5b787a73bbb4f66cfd3cbf3"
integrity sha512-N8aGu27xO99HaV957EfvB2StYRY3Gf2TdijTkYmzwULuM9aij2YeyVzDoAd4P+qYh21MRMITnJ4652sUM+SUbw==

"@hapi/accept@^6.0.3":
version "6.0.3"
Expand Down

0 comments on commit 6ba40c4

Please sign in to comment.