mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
02eb4b35e2
* Run swiftformat for whitespace. * Run swiftformat with some rules.
29 lines
646 B
Swift
29 lines
646 B
Swift
//
|
|
// MediaSource.swift
|
|
// ElementX
|
|
//
|
|
// Created by Stefan Ceriu on 06/04/2022.
|
|
// Copyright © 2022 Element. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import MatrixRustSDK
|
|
|
|
struct MediaSource: Equatable {
|
|
let underlyingSource: MatrixRustSDK.MediaSource
|
|
|
|
init(source: MatrixRustSDK.MediaSource) {
|
|
underlyingSource = source
|
|
}
|
|
|
|
init(urlString: String) {
|
|
underlyingSource = MatrixRustSDK.mediaSourceFromUrl(url: urlString)
|
|
}
|
|
|
|
// MARK: - Equatable
|
|
|
|
static func == (lhs: MediaSource, rhs: MediaSource) -> Bool {
|
|
lhs.underlyingSource.url() == rhs.underlyingSource.url()
|
|
}
|
|
}
|