OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2473 { | 2473 { |
2474 if (!m_textTracks || !m_textTracks->length()) | 2474 if (!m_textTracks || !m_textTracks->length()) |
2475 return; | 2475 return; |
2476 | 2476 |
2477 AutomaticTrackSelection::Configuration configuration; | 2477 AutomaticTrackSelection::Configuration configuration; |
2478 if (m_processingPreferenceChange) | 2478 if (m_processingPreferenceChange) |
2479 configuration.disableCurrentlyEnabledTracks = true; | 2479 configuration.disableCurrentlyEnabledTracks = true; |
2480 if (m_closedCaptionsVisible) | 2480 if (m_closedCaptionsVisible) |
2481 configuration.forceEnableSubtitleOrCaptionTrack = true; | 2481 configuration.forceEnableSubtitleOrCaptionTrack = true; |
2482 | 2482 |
2483 #if OS(ANDROID) | |
2484 // Determine captions and subtitles visibility based on OS captions state on ly if the platform | |
2485 // is Android because the setting is currently only available on Android. | |
2486 Settings* settings = document().settings(); | |
2487 if (settings) { | |
2488 if (!settings->textTracksEnabled()) | |
2489 return; | |
2490 configuration.forceEnableSubtitleOrCaptionTrack = true; | |
fs
2015/05/05 15:09:15
This flags forces _a_ track (any track) to be enab
philipj_slow
2015/05/06 09:54:27
This bit seems a bit odd to me as well. How about
srivats
2015/06/09 00:45:51
Done.
| |
2491 } | |
2492 #endif | |
2493 | |
2483 AutomaticTrackSelection trackSelection(configuration); | 2494 AutomaticTrackSelection trackSelection(configuration); |
2484 trackSelection.perform(*m_textTracks); | 2495 trackSelection.perform(*m_textTracks); |
2485 | 2496 |
2486 textTracksChanged(); | 2497 textTracksChanged(); |
2487 } | 2498 } |
2488 | 2499 |
2489 bool HTMLMediaElement::havePotentialSourceChild() | 2500 bool HTMLMediaElement::havePotentialSourceChild() |
2490 { | 2501 { |
2491 // Stash the current <source> node and next nodes so we can restore them aft er checking | 2502 // Stash the current <source> node and next nodes so we can restore them aft er checking |
2492 // to see there is another potential. | 2503 // to see there is another potential. |
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3665 | 3676 |
3666 #if ENABLE(WEB_AUDIO) | 3677 #if ENABLE(WEB_AUDIO) |
3667 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 3678 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
3668 { | 3679 { |
3669 if (!visitor->isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider()) | 3680 if (!visitor->isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider()) |
3670 audioSourceProvider()->setClient(nullptr); | 3681 audioSourceProvider()->setClient(nullptr); |
3671 } | 3682 } |
3672 #endif | 3683 #endif |
3673 | 3684 |
3674 } | 3685 } |
OLD | NEW |