Skip to content

Commit

Permalink
wwdc 内容更新
Browse files Browse the repository at this point in the history
  • Loading branch information
ming1016 committed Jun 14, 2024
1 parent b593360 commit 712fe1e
Show file tree
Hide file tree
Showing 4 changed files with 24,348 additions and 8,962 deletions.
2 changes: 2 additions & 0 deletions SwiftPamphletApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2109,6 +2109,7 @@
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = "";
};
name = Debug;
Expand Down Expand Up @@ -2164,6 +2165,7 @@
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = "";
};
name = Release;
Expand Down
22 changes: 15 additions & 7 deletions SwiftPamphletApp/Guide/WWDC/WWDCDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ struct WWDCDetailView: View {
if selectInfo == nil {
VStack(spacing: 10) {
HStack {
Spacer()
Text(ss.title)
.font(.title)
Spacer()
Expand All @@ -48,13 +47,22 @@ struct WWDCDetailView: View {
}
}
VStack(alignment:.leading, spacing: 10) {
if let vurl = ss.media.videoOriginalUrl {
if let vurl = ss.media.streamHLS {
if let okVurl = URL(string: vurl) {
if ss.year > 2020 {
VideoPlayer(player: AVPlayer(url: okVurl))
} else {
Link("视频地址:\(vurl)", destination: okVurl)
}
// if ss.year > 2020 {
// VideoPlayer(player: AVPlayer(url: okVurl))
// } else {
// Link("视频地址:\(vurl)", destination: okVurl)
// }
VideoPlayer(player: AVPlayer(url: okVurl))
}
}
HStack {
if let hd = ss.media.downloadHD {
Link("HD 下载链接", destination: URL(string: hd)!)
}
if let sd = ss.media.downloadSD {
Link("SD 下载链接", destination: URL(string: sd)!)
}
}
if let platforms = ss.platforms {
Expand Down
9 changes: 6 additions & 3 deletions SwiftPamphletApp/Guide/WWDC/WWDCModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ struct WWDCSessionModel: Jsonable {

struct WWDCMedia: Decodable, Hashable {
var duration: Int?
var videoOriginalFilename: String?
var videoOriginalUrl: String?
var videoFilename: String?
// var videoOriginalFilename: String?
// var videoOriginalUrl: String?
// var videoFilename: String?
var streamHLS: String?
var downloadHD: String?
var downloadSD: String?
}

struct WWDCEvent: Jsonable {
Expand Down
Loading

0 comments on commit 712fe1e

Please sign in to comment.