mirror of
https://github.com/RSSNext/Folo.git
synced 2026-10-18 22:01:28 +08:00
244aca2ad6
* refactor: move timeStringToSeconds to utility function * feat: add seekAudio functionality to bridge and implement timestamp handling in MarkdownLink * feat: implement audio seeking functionality in EntryContentWebView * feat: implement audio seeking functionality for iOS * chore: clean code * fix: audio seeking functionality for iOS
40 lines
721 B
Swift
40 lines
721 B
Swift
//
|
|
// SharedWebView+BridgeData.swift
|
|
// Pods
|
|
//
|
|
// Created by Innei on 2025/2/7.
|
|
//
|
|
import Foundation
|
|
import UIKit
|
|
|
|
private protocol BasePayload {
|
|
var type: String { get }
|
|
}
|
|
|
|
struct SetContentHeightPayload: Codable, BasePayload {
|
|
var type: String
|
|
var payload: CGFloat
|
|
}
|
|
|
|
struct BridgeDataBasePayload: Codable {
|
|
var type: String
|
|
}
|
|
|
|
struct PreviewImagePayloadProps: Codable {
|
|
var imageUrls: [String]
|
|
var index: Int = 0
|
|
}
|
|
|
|
struct PreviewImagePayload: Codable, BasePayload {
|
|
var type: String
|
|
var payload: PreviewImagePayloadProps
|
|
}
|
|
|
|
struct AudioSeekPayloadProps: Codable {
|
|
let time: Double
|
|
}
|
|
|
|
struct AudioSeekPayload: Codable, BasePayload {
|
|
var type: String
|
|
var payload: AudioSeekPayloadProps
|
|
} |