From 76d8d6ada2696708f3ec2da6e647581eb2b16ebb Mon Sep 17 00:00:00 2001 From: chansung park Date: Mon, 31 May 2021 00:20:52 +0900 Subject: [PATCH 1/4] add keyword field in Video proto --- client/lib/protos/pkg/pr12er/messages.pb.dart | 8 +++++ .../protos/pkg/pr12er/messages.pbjson.dart | 3 +- server/pkg/pr12er/messages.pb.go | 36 ++++++++++++------- server/pkg/pr12er/messages.proto | 1 + 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/client/lib/protos/pkg/pr12er/messages.pb.dart b/client/lib/protos/pkg/pr12er/messages.pb.dart index 4a62f6ef..24b73815 100644 --- a/client/lib/protos/pkg/pr12er/messages.pb.dart +++ b/client/lib/protos/pkg/pr12er/messages.pb.dart @@ -21,6 +21,7 @@ class Video extends $pb.GeneratedMessage { ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'presenter') ..e(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'category', $pb.PbFieldType.OE, defaultOrMaker: Category.CATEGORY_UNSPECIFIED, valueOf: Category.valueOf, enumValues: Category.values) ..a<$core.int>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'numberOfLike', $pb.PbFieldType.O3) + ..pPS(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'keywords') ..hasRequiredFields = false ; @@ -32,6 +33,7 @@ class Video extends $pb.GeneratedMessage { $core.String? presenter, Category? category, $core.int? numberOfLike, + $core.Iterable<$core.String>? keywords, }) { final _result = create(); if (id != null) { @@ -52,6 +54,9 @@ class Video extends $pb.GeneratedMessage { if (numberOfLike != null) { _result.numberOfLike = numberOfLike; } + if (keywords != null) { + _result.keywords.addAll(keywords); + } return _result; } factory Video.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -128,5 +133,8 @@ class Video extends $pb.GeneratedMessage { $core.bool hasNumberOfLike() => $_has(5); @$pb.TagNumber(6) void clearNumberOfLike() => clearField(6); + + @$pb.TagNumber(7) + $core.List<$core.String> get keywords => $_getList(6); } diff --git a/client/lib/protos/pkg/pr12er/messages.pbjson.dart b/client/lib/protos/pkg/pr12er/messages.pbjson.dart index 3160e6b2..6d556018 100644 --- a/client/lib/protos/pkg/pr12er/messages.pbjson.dart +++ b/client/lib/protos/pkg/pr12er/messages.pbjson.dart @@ -33,8 +33,9 @@ const Video$json = const { const {'1': 'presenter', '3': 4, '4': 1, '5': 9, '10': 'presenter'}, const {'1': 'category', '3': 5, '4': 1, '5': 14, '6': '.pkg.pr12er.Category', '10': 'category'}, const {'1': 'number_of_like', '3': 6, '4': 1, '5': 5, '10': 'numberOfLike'}, + const {'1': 'keywords', '3': 7, '4': 3, '5': 9, '10': 'keywords'}, ], }; /// Descriptor for `Video`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List videoDescriptor = $convert.base64Decode('CgVWaWRlbxIOCgJpZBgBIAEoBVICaWQSFAoFdGl0bGUYAiABKAlSBXRpdGxlEhIKBGxpbmsYAyABKAlSBGxpbmsSHAoJcHJlc2VudGVyGAQgASgJUglwcmVzZW50ZXISMAoIY2F0ZWdvcnkYBSABKA4yFC5wa2cucHIxMmVyLkNhdGVnb3J5UghjYXRlZ29yeRIkCg5udW1iZXJfb2ZfbGlrZRgGIAEoBVIMbnVtYmVyT2ZMaWtl'); +final $typed_data.Uint8List videoDescriptor = $convert.base64Decode('CgVWaWRlbxIOCgJpZBgBIAEoBVICaWQSFAoFdGl0bGUYAiABKAlSBXRpdGxlEhIKBGxpbmsYAyABKAlSBGxpbmsSHAoJcHJlc2VudGVyGAQgASgJUglwcmVzZW50ZXISMAoIY2F0ZWdvcnkYBSABKA4yFC5wa2cucHIxMmVyLkNhdGVnb3J5UghjYXRlZ29yeRIkCg5udW1iZXJfb2ZfbGlrZRgGIAEoBVIMbnVtYmVyT2ZMaWtlEhoKCGtleXdvcmRzGAcgAygJUghrZXl3b3Jkcw=='); diff --git a/server/pkg/pr12er/messages.pb.go b/server/pkg/pr12er/messages.pb.go index e5000d80..9afd4f1d 100644 --- a/server/pkg/pr12er/messages.pb.go +++ b/server/pkg/pr12er/messages.pb.go @@ -89,6 +89,7 @@ type Video struct { Presenter string `protobuf:"bytes,4,opt,name=presenter,proto3" json:"presenter,omitempty"` Category Category `protobuf:"varint,5,opt,name=category,proto3,enum=pkg.pr12er.Category" json:"category,omitempty"` NumberOfLike int32 `protobuf:"varint,6,opt,name=number_of_like,json=numberOfLike,proto3" json:"number_of_like,omitempty"` + Keywords []string `protobuf:"bytes,7,rep,name=keywords,proto3" json:"keywords,omitempty"` } func (x *Video) Reset() { @@ -165,12 +166,19 @@ func (x *Video) GetNumberOfLike() int32 { return 0 } +func (x *Video) GetKeywords() []string { + if x != nil { + return x.Keywords + } + return nil +} + var File_pkg_pr12er_messages_proto protoreflect.FileDescriptor var file_pkg_pr12er_messages_proto_rawDesc = []byte{ 0x0a, 0x19, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x70, 0x6b, 0x67, - 0x2e, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x22, 0xb7, 0x01, 0x0a, 0x05, 0x56, 0x69, 0x64, 0x65, + 0x2e, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x22, 0xd3, 0x01, 0x0a, 0x05, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, @@ -182,18 +190,20 @@ var file_pkg_pr12er_messages_proto_rawDesc = []byte{ 0x79, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x4c, 0x69, 0x6b, - 0x65, 0x2a, 0x82, 0x01, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x18, - 0x0a, 0x14, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x54, 0x45, - 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, - 0x0c, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4e, 0x4c, 0x50, 0x10, 0x02, 0x12, - 0x10, 0x0a, 0x0c, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4f, 0x43, 0x52, 0x10, - 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x41, 0x55, - 0x44, 0x49, 0x4f, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, - 0x59, 0x5f, 0x52, 0x53, 0x10, 0x05, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x74, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x2a, 0x82, 0x01, + 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, + 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, + 0x5f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x41, 0x54, + 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4e, 0x4c, 0x50, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x43, + 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4f, 0x43, 0x52, 0x10, 0x03, 0x12, 0x12, 0x0a, + 0x0e, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x10, + 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x52, 0x53, + 0x10, 0x05, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/server/pkg/pr12er/messages.proto b/server/pkg/pr12er/messages.proto index ffecde66..c79f3a28 100644 --- a/server/pkg/pr12er/messages.proto +++ b/server/pkg/pr12er/messages.proto @@ -19,4 +19,5 @@ message Video { string presenter = 4; Category category = 5; int32 number_of_like = 6; + repeated string keywords = 7; } From 59335f1c7fc95c0e12dc7f52ae2ca272c178eed2 Mon Sep 17 00:00:00 2001 From: chansung park Date: Mon, 31 May 2021 00:47:37 +0900 Subject: [PATCH 2/4] add new page with youtube view --- client/ios/Flutter/Debug.xcconfig | 1 + client/ios/Flutter/Release.xcconfig | 1 + client/ios/Podfile | 41 +++++++ client/ios/Podfile.lock | 33 ++++++ client/ios/Runner.xcodeproj/project.pbxproj | 68 +++++++++++ .../contents.xcworkspacedata | 3 + client/lib/detail.dart | 106 ++++++++++++++++++ client/lib/main.dart | 35 +++--- client/lib/test-server.dart | 24 ++-- client/pubspec.lock | 15 +++ client/pubspec.yaml | 1 + 11 files changed, 303 insertions(+), 25 deletions(-) create mode 100644 client/ios/Podfile create mode 100644 client/ios/Podfile.lock create mode 100644 client/lib/detail.dart diff --git a/client/ios/Flutter/Debug.xcconfig b/client/ios/Flutter/Debug.xcconfig index 592ceee8..ec97fc6f 100644 --- a/client/ios/Flutter/Debug.xcconfig +++ b/client/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/client/ios/Flutter/Release.xcconfig b/client/ios/Flutter/Release.xcconfig index 592ceee8..c4855bfe 100644 --- a/client/ios/Flutter/Release.xcconfig +++ b/client/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/client/ios/Podfile b/client/ios/Podfile new file mode 100644 index 00000000..1e8c3c90 --- /dev/null +++ b/client/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/client/ios/Podfile.lock b/client/ios/Podfile.lock new file mode 100644 index 00000000..aedb1a88 --- /dev/null +++ b/client/ios/Podfile.lock @@ -0,0 +1,33 @@ +PODS: + - Flutter (1.0.0) + - flutter_inappwebview (0.0.1): + - Flutter + - flutter_inappwebview/Core (= 0.0.1) + - OrderedSet (~> 5.0) + - flutter_inappwebview/Core (0.0.1): + - Flutter + - OrderedSet (~> 5.0) + - OrderedSet (5.0.0) + +DEPENDENCIES: + - Flutter (from `Flutter`) + - flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`) + +SPEC REPOS: + trunk: + - OrderedSet + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + flutter_inappwebview: + :path: ".symlinks/plugins/flutter_inappwebview/ios" + +SPEC CHECKSUMS: + Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c + flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721 + OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c + +PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c + +COCOAPODS: 1.10.0 diff --git a/client/ios/Runner.xcodeproj/project.pbxproj b/client/ios/Runner.xcodeproj/project.pbxproj index 75cb1aeb..d223de01 100644 --- a/client/ios/Runner.xcodeproj/project.pbxproj +++ b/client/ios/Runner.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 31D63AA4C4900749C7391231 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66F25E4AC40E3622D7F0B165 /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -31,7 +32,10 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 159BBEEA4A616A3BBF451A22 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 66F25E4AC40E3622D7F0B165 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 685482DD8707E3FCDF6CD11C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -42,6 +46,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A2FDA7AADBB20FE69705EB95 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,12 +54,24 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 31D63AA4C4900749C7391231 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 42B9C245395BD127A334661B /* Pods */ = { + isa = PBXGroup; + children = ( + 685482DD8707E3FCDF6CD11C /* Pods-Runner.debug.xcconfig */, + A2FDA7AADBB20FE69705EB95 /* Pods-Runner.release.xcconfig */, + 159BBEEA4A616A3BBF451A22 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -72,6 +89,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + 42B9C245395BD127A334661B /* Pods */, + D2373942A5573E2CE56B216E /* Frameworks */, ); sourceTree = ""; }; @@ -98,6 +117,14 @@ path = Runner; sourceTree = ""; }; + D2373942A5573E2CE56B216E /* Frameworks */ = { + isa = PBXGroup; + children = ( + 66F25E4AC40E3622D7F0B165 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -105,12 +132,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 375EB4BC7B32A2A6D5D2756E /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 00D7A2478E99940B5D3C22A8 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -169,6 +198,45 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 00D7A2478E99940B5D3C22A8 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 375EB4BC7B32A2A6D5D2756E /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/client/ios/Runner.xcworkspace/contents.xcworkspacedata b/client/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a16..21a3cc14 100644 --- a/client/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/client/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/client/lib/detail.dart b/client/lib/detail.dart new file mode 100644 index 00000000..23c68c43 --- /dev/null +++ b/client/lib/detail.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:youtube_player_flutter/youtube_player_flutter.dart'; + +class DetailApp extends StatelessWidget { + late String url; + + DetailApp(String url) { + this.url = url; + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Welcome to Flutter', + home: Scaffold( + appBar: AppBar( + automaticallyImplyLeading: true, + leading: IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + Navigator.pop(context); + }, + ), + title: Text('Detail View'), + ), + body: Detail(this.url)), + ); + } +} + +class Detail extends StatefulWidget { + late String url; + + Detail(String url) { + this.url = url; + } + @override + _DetailState createState() => _DetailState(this.url); +} + +class _DetailState extends State { + late String url; + late YoutubePlayerController _controller; + + _DetailState(String url) { + this.url = url; + } + + @override + void initState() { + super.initState(); + + _controller = YoutubePlayerController( + initialVideoId: this.url, + flags: YoutubePlayerFlags( + mute: false, + autoPlay: true, + ), + ); + } + + @override + Widget build(BuildContext context) { + return YoutubePlayer( + aspectRatio: 16 / 9, + controller: _controller, + showVideoProgressIndicator: false, + progressIndicatorColor: Colors.redAccent, + progressColors: ProgressBarColors( + playedColor: Colors.transparent, + handleColor: Colors.transparent, + ), + onEnded: (data) { + _controller.pause(); + }, + topActions: [ + const SizedBox(width: 8.0), + Expanded( + child: Text( + _controller.metadata.title, + style: const TextStyle( + color: Colors.white, + fontSize: 18.0, + ), + overflow: TextOverflow.ellipsis, + maxLines: 1, + ), + ), + ], + bottomActions: [ + const SizedBox(width: 14.0), + CurrentPosition(), + const SizedBox(width: 8.0), + ProgressBar( + isExpanded: true, + colors: ProgressBarColors( + playedColor: Colors.red, + handleColor: Colors.red, + backgroundColor: Colors.white, + bufferedColor: Colors.grey), + ), + RemainingDuration(), + ], + ); + } +} diff --git a/client/lib/main.dart b/client/lib/main.dart index e2f5a8e7..864a91c4 100644 --- a/client/lib/main.dart +++ b/client/lib/main.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'detail.dart'; import 'service.dart'; import 'package:pr12er/protos/pkg/pr12er/messages.pb.dart'; @@ -59,23 +60,23 @@ class _ClientState extends State { if (!snapshot.hasData) { return Center(child: CircularProgressIndicator()); } - return ListView.builder( - padding: const EdgeInsets.all(8), - itemCount: snapshot.data.length, - itemBuilder: (BuildContext context, int index) { - return getTile( - index, - snapshot.data[index].title, - snapshot.data[index].presenter, - "현재 키워드 지원(X)", - snapshot.data[index].category); - }); - + return ListView.builder( + padding: const EdgeInsets.all(8), + itemCount: snapshot.data.length, + itemBuilder: (BuildContext context, int index) { + return getTile( + index, + snapshot.data[index].title, + snapshot.data[index].presenter, + "현재 키워드 지원(X)", + snapshot.data[index].category, + snapshot.data[index].link); + }); }); } Widget getTile(int index, String title, String presenter, String keyword, - Category category) { + Category category, String url) { return Card( child: ListTile( leading: Column( @@ -98,6 +99,14 @@ class _ClientState extends State { trailing: Column( mainAxisAlignment: MainAxisAlignment.center, children: [Icon(Icons.favorite_border_outlined)]), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => DetailApp(url), + ), + ); + }, ), ); } diff --git a/client/lib/test-server.dart b/client/lib/test-server.dart index 31a0577c..07b358b4 100644 --- a/client/lib/test-server.dart +++ b/client/lib/test-server.dart @@ -15,21 +15,21 @@ class GreeterService extends Pr12erServiceBase { List