質問編集履歴

5

追記

2017/05/20 06:09

投稿

MasakiHori
MasakiHori

スコア3384

test CHANGED
File without changes
test CHANGED
@@ -95,3 +95,17 @@
95
95
  リンクを忘れていたのでリンクしておきます
96
96
 
97
97
  [WebKitでの該当部分](https://github.com/WebKit/webkit/blob/5277f6fb92b0c03958265d24a7692142f7bdeaf8/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm#L504)
98
+
99
+
100
+
101
+ ---
102
+
103
+ - 追記 2017.05.20
104
+
105
+
106
+
107
+ WKWebKitを用いることにより希望どおりの動作 - WKWebViewごとにミュートする - を実現できました。
108
+
109
+
110
+
111
+ ただ、WKWebKitへのハックを行なっているためここに回答として記載して良いか分かりませんので、回答は控えさせていただきます。

4

状況報告

2017/05/20 06:09

投稿

MasakiHori
MasakiHori

スコア3384

test CHANGED
File without changes
test CHANGED
@@ -48,79 +48,9 @@
48
48
 
49
49
 
50
50
 
51
- ```
51
+ > ここに動かないソースコードがありました
52
52
 
53
- - (void)applicationWillFinishLaunching:(NSNotification *)notification
54
53
 
55
- {
56
-
57
- AudioComponentDescription audioCompDesc;
58
-
59
-
60
-
61
- audioCompDesc.componentType = kAudioUnitType_Output;
62
-
63
- audioCompDesc.componentSubType = kAudioUnitSubType_DefaultOutput;
64
-
65
- audioCompDesc.componentManufacturer = kAudioUnitManufacturer_Apple;
66
-
67
- audioCompDesc.componentFlags = 0;
68
-
69
- audioCompDesc.componentFlagsMask = 0;
70
-
71
-
72
-
73
- NSError *error = nil;
74
-
75
- AUAudioUnit *auunit = [[AUAudioUnit alloc] initWithComponentDescription:audioCompDesc error:&error];
76
-
77
- AUParameterTree *tree = auunit.parameterTree;
78
-
79
-
80
-
81
- NSLog(@"Tree children -> %@", tree.children);
82
-
83
- NSLog(@"Tree allParams -> %@", tree.allParameters);
84
-
85
-
86
-
87
- AUParameter *param = [tree parameterWithID: kHALOutputParam_Volume
88
-
89
- scope:kAudioUnitScope_Global
90
-
91
- element:0];
92
-
93
- NSLog(@"param -> %@", param); // AUParameterが取得されていることを確認
94
-
95
- param.value = 0;
96
-
97
- NSLog(@"param -> %@", param); // 値が0になっていることを確認
98
-
99
- }
100
-
101
- ```
102
-
103
- 出力
104
-
105
- ```
106
-
107
- 2017-04-27 21:10:40.744283+0900 TestSounds[19002:9867773] Tree children -> (
108
-
109
- "<AUParameterGroup: 0x6100000c59b0, \"global\", \"global\">"
110
-
111
- )
112
-
113
- 2017-04-27 21:10:40.744416+0900 TestSounds[19002:9867773] Tree allParams -> (
114
-
115
- "<AUParameter: 0x6100000e1f80, \"14\", \"Volume\", addr 0xe, val 1.000>"
116
-
117
- )
118
-
119
- 2017-04-27 21:10:40.744475+0900 TestSounds[19002:9867773] param -> <AUParameter: 0x6100000e1f80, "14", "Volume", addr 0xe, val 1.000>
120
-
121
- 2017-04-27 21:10:40.744514+0900 TestSounds[19002:9867773] param -> <AUParameter: 0x6100000e1f80, "14", "Volume", addr 0xe, val 0.000>
122
-
123
- ```
124
54
 
125
55
  結果はミュートされない、です。
126
56
 
@@ -145,3 +75,23 @@
145
75
 
146
76
 
147
77
  回答を頂いた方、この質問に興味を示された方々ありがとうございました
78
+
79
+
80
+
81
+ ---
82
+
83
+ - 追記 2017.05.17
84
+
85
+
86
+
87
+ いろいろ試した結果上記方法はプロセスごとのミュートでした
88
+
89
+ そのため別プロセスで動くFlashでは機能しないことが分かりました
90
+
91
+ 現在WebKitによって起動された別プロセスへのアクセス、そのプロセス上での処理が可能かを調査中です
92
+
93
+
94
+
95
+ リンクを忘れていたのでリンクしておきます
96
+
97
+ [WebKitでの該当部分](https://github.com/WebKit/webkit/blob/5277f6fb92b0c03958265d24a7692142f7bdeaf8/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm#L504)

3

情報を追記

2017/05/17 01:11

投稿

MasakiHori
MasakiHori

スコア3384

test CHANGED
File without changes
test CHANGED
@@ -127,3 +127,21 @@
127
127
 
128
128
 
129
129
  何か情報がありましたらよろしくお願いします。
130
+
131
+
132
+
133
+ ---
134
+
135
+ - 追記 2017.05.16
136
+
137
+
138
+
139
+ OSSの方のWebKitにてアタリを引きました。
140
+
141
+ 現在詳細を調査中です。
142
+
143
+ まとまりましたら回答いたします。
144
+
145
+
146
+
147
+ 回答を頂いた方、この質問に興味を示された方々ありがとうございました

2

試してみたことを追加

2017/05/16 14:26

投稿

MasakiHori
MasakiHori

スコア3384

test CHANGED
File without changes
test CHANGED
@@ -37,3 +37,93 @@
37
37
  情報へのポインタでも構いません。
38
38
 
39
39
  よろしくお願いします。
40
+
41
+
42
+
43
+ ---
44
+
45
+ - 追記 2017.04.27
46
+
47
+ CoreAudioにあたりをつけて以下のテストコードを試してみました。(Swiftに慣れてないのでobjcです)
48
+
49
+
50
+
51
+ ```
52
+
53
+ - (void)applicationWillFinishLaunching:(NSNotification *)notification
54
+
55
+ {
56
+
57
+ AudioComponentDescription audioCompDesc;
58
+
59
+
60
+
61
+ audioCompDesc.componentType = kAudioUnitType_Output;
62
+
63
+ audioCompDesc.componentSubType = kAudioUnitSubType_DefaultOutput;
64
+
65
+ audioCompDesc.componentManufacturer = kAudioUnitManufacturer_Apple;
66
+
67
+ audioCompDesc.componentFlags = 0;
68
+
69
+ audioCompDesc.componentFlagsMask = 0;
70
+
71
+
72
+
73
+ NSError *error = nil;
74
+
75
+ AUAudioUnit *auunit = [[AUAudioUnit alloc] initWithComponentDescription:audioCompDesc error:&error];
76
+
77
+ AUParameterTree *tree = auunit.parameterTree;
78
+
79
+
80
+
81
+ NSLog(@"Tree children -> %@", tree.children);
82
+
83
+ NSLog(@"Tree allParams -> %@", tree.allParameters);
84
+
85
+
86
+
87
+ AUParameter *param = [tree parameterWithID: kHALOutputParam_Volume
88
+
89
+ scope:kAudioUnitScope_Global
90
+
91
+ element:0];
92
+
93
+ NSLog(@"param -> %@", param); // AUParameterが取得されていることを確認
94
+
95
+ param.value = 0;
96
+
97
+ NSLog(@"param -> %@", param); // 値が0になっていることを確認
98
+
99
+ }
100
+
101
+ ```
102
+
103
+ 出力
104
+
105
+ ```
106
+
107
+ 2017-04-27 21:10:40.744283+0900 TestSounds[19002:9867773] Tree children -> (
108
+
109
+ "<AUParameterGroup: 0x6100000c59b0, \"global\", \"global\">"
110
+
111
+ )
112
+
113
+ 2017-04-27 21:10:40.744416+0900 TestSounds[19002:9867773] Tree allParams -> (
114
+
115
+ "<AUParameter: 0x6100000e1f80, \"14\", \"Volume\", addr 0xe, val 1.000>"
116
+
117
+ )
118
+
119
+ 2017-04-27 21:10:40.744475+0900 TestSounds[19002:9867773] param -> <AUParameter: 0x6100000e1f80, "14", "Volume", addr 0xe, val 1.000>
120
+
121
+ 2017-04-27 21:10:40.744514+0900 TestSounds[19002:9867773] param -> <AUParameter: 0x6100000e1f80, "14", "Volume", addr 0xe, val 0.000>
122
+
123
+ ```
124
+
125
+ 結果はミュートされない、です。
126
+
127
+
128
+
129
+ 何か情報がありましたらよろしくお願いします。

1

追記

2017/04/27 12:14

投稿

MasakiHori
MasakiHori

スコア3384

test CHANGED
File without changes
test CHANGED
@@ -27,3 +27,13 @@
27
27
  作っているものはこれです。
28
28
 
29
29
  [OSDNのページ](https://ja.osdn.net/projects/kcd/)
30
+
31
+
32
+
33
+
34
+
35
+ - 追記
36
+
37
+ 情報へのポインタでも構いません。
38
+
39
+ よろしくお願いします。